[mutter] MetaWindowGroup: Only compensate for transforms when in clone paint



commit 749237a28e87a46a8b0fbe0415628c99b406a54f
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Jul 15 16:09:41 2016 +0800

    MetaWindowGroup: Only compensate for transforms when in clone paint
    
    We were compensating for a clone paint viewport offset even when we
    were not in clone paniting mode. This would break painting if we offset
    the viewport for some other reason for example as in the future stage
    view painting.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768976

 src/compositor/meta-window-group.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c
index 4a86d54..4b90777 100644
--- a/src/compositor/meta-window-group.c
+++ b/src/compositor/meta-window-group.c
@@ -79,11 +79,22 @@ meta_window_group_paint (ClutterActor *actor)
    * painting currently, and never worry about how actors are positioned
    * on the stage.
    */
-  if (!meta_actor_painting_untransformed (screen_width, screen_height, &paint_x_origin, &paint_y_origin) ||
-      !meta_actor_is_untransformed (actor, NULL, NULL))
+  if (clutter_actor_is_in_clone_paint (actor))
     {
-      CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);
-      return;
+      if (!meta_actor_painting_untransformed (screen_width,
+                                              screen_height,
+                                              &paint_x_origin,
+                                              &paint_y_origin) ||
+          !meta_actor_is_untransformed (actor, NULL, NULL))
+        {
+          CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor);
+          return;
+        }
+    }
+  else
+    {
+      paint_x_origin = 0;
+      paint_y_origin = 0;
     }
 
   visible_rect.x = visible_rect.y = 0;


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