[totem] Revert "backend: Don't rotate the frame itself"



commit 0db2913d5b021688c00a1575b9ed555d56a4fc13
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Mar 8 17:14:04 2013 +0100

    Revert "backend: Don't rotate the frame itself"
    
    This reverts commit b532b4464cea5db46f060c650d78f2300e4c42a6.
    
    The code clashed with Lionel's bug fixes (which also
    includes fixing the same bug this fixed).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=679169

 src/backend/totem-aspect-frame.c |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/src/backend/totem-aspect-frame.c b/src/backend/totem-aspect-frame.c
index 85c23ea..160b48d 100644
--- a/src/backend/totem-aspect-frame.c
+++ b/src/backend/totem-aspect-frame.c
@@ -141,17 +141,12 @@ totem_aspect_frame_set_rotation_internal (TotemAspectFrame *frame,
                                          gdouble           rotation,
                                          gboolean          animate)
 {
-  ClutterActor *actor, *child;
+  ClutterActor *actor;
   gfloat w, h;
   gdouble scale;
 
   g_return_if_fail (TOTEM_IS_ASPECT_FRAME (frame));
 
-  actor = CLUTTER_ACTOR (frame);
-  child = clutter_actor_get_child_at_index (actor, 0);
-  if (!child)
-    return;
-
   g_object_get (G_OBJECT (frame),
                "width", &w,
                "height", &h,
@@ -171,16 +166,18 @@ totem_aspect_frame_set_rotation_internal (TotemAspectFrame *frame,
       scale = 1.0;
     }
 
+  actor = CLUTTER_ACTOR (frame);
+
   if (animate)
     {
-      clutter_actor_save_easing_state (child);
-      clutter_actor_set_easing_duration (child, 500);
+      clutter_actor_save_easing_state (actor);
+      clutter_actor_set_easing_duration (actor, 500);
     }
-  clutter_actor_set_rotation_angle (child, CLUTTER_Z_AXIS, rotation);
-  clutter_actor_set_scale (child, scale, scale);
+  clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, rotation);
+  clutter_actor_set_scale (actor, scale, scale);
 
   if (animate)
-    clutter_actor_restore_easing_state (child);
+    clutter_actor_restore_easing_state (actor);
 }
 
 static void
@@ -202,8 +199,6 @@ totem_aspect_frame_allocate (ClutterActor           *actor,
   if (!child)
     return;
 
-  clutter_actor_set_pivot_point (child, 0.5f, 0.5f);
-
   box_width = box->x2 - box->x1;
   box_height = box->y2 - box->y1;
   clutter_actor_get_preferred_size (child, NULL, NULL, &width, &height);
@@ -330,6 +325,7 @@ static void
 totem_aspect_frame_init (TotemAspectFrame *self)
 {
   self->priv = ASPECT_FRAME_PRIVATE (self);
+  clutter_actor_set_pivot_point (CLUTTER_ACTOR (self), 0.5f, 0.5f);
 }
 
 ClutterActor *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]