From 749237a28e87a46a8b0fbe0415628c99b406a54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 15 Jul 2016 16:09:41 +0800 Subject: [PATCH] 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 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c index 4a86d5435..4b907777e 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;