From 2705c87f741001b811c59ccbe662744c6e6fc67e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 5 Jul 2015 23:55:43 -0700 Subject: [PATCH] window-group: Fix issues when translated It seems that when translated, paint_offset and actor_offset will always be the same, so our translation of the clip group won't work. For now, until I figure out what's going on here, just use the painting offset, since that what seems to make sense to me. I didn't write this code, though, so I don't know why the actor's allocation was involved in this computation at all. I tested briefly with clones (magnifier, manual cloning through the looking glass) and couldn't find any other artifacts, so I'm going to do this for now. --- src/compositor/meta-window-group.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/compositor/meta-window-group.c b/src/compositor/meta-window-group.c index 360f669da..4a86d5435 100644 --- a/src/compositor/meta-window-group.c +++ b/src/compositor/meta-window-group.c @@ -58,9 +58,7 @@ meta_window_group_paint (ClutterActor *actor) cairo_region_t *clip_region; cairo_region_t *unobscured_region; cairo_rectangle_int_t visible_rect, clip_rect; - int paint_x_offset, paint_y_offset; int paint_x_origin, paint_y_origin; - int actor_x_origin, actor_y_origin; int screen_width, screen_height; MetaWindowGroup *window_group = META_WINDOW_GROUP (actor); @@ -82,7 +80,7 @@ meta_window_group_paint (ClutterActor *actor) * on the stage. */ if (!meta_actor_painting_untransformed (screen_width, screen_height, &paint_x_origin, &paint_y_origin) || - !meta_actor_is_untransformed (actor, &actor_x_origin, &actor_y_origin)) + !meta_actor_is_untransformed (actor, NULL, NULL)) { CLUTTER_ACTOR_CLASS (meta_window_group_parent_class)->paint (actor); return; @@ -105,9 +103,7 @@ meta_window_group_paint (ClutterActor *actor) clip_region = cairo_region_create_rectangle (&clip_rect); - paint_x_offset = paint_x_origin - actor_x_origin; - paint_y_offset = paint_y_origin - actor_y_origin; - cairo_region_translate (clip_region, -paint_x_offset, -paint_y_offset); + cairo_region_translate (clip_region, -paint_x_origin, -paint_y_origin); meta_cullable_cull_out (META_CULLABLE (window_group), unobscured_region, clip_region);