summaryrefslogtreecommitdiff
path: root/src/compositor/compositor-xrender.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <[email protected]>2015-09-19 03:02:06 +0300
committermonsta <[email protected]>2015-12-17 14:03:56 +0300
commit6c1fe100755895272c0165d1c884ade8d464a7be (patch)
treee45303ff5cd952425c8e797197647baa24f10796 /src/compositor/compositor-xrender.c
parent7040bfa954775937bf3d524d8b714335adb766fa (diff)
downloadmarco-6c1fe100755895272c0165d1c884ade8d464a7be.tar.bz2
marco-6c1fe100755895272c0165d1c884ade8d464a7be.tar.xz
compositor-xrender: include old shape in damage
https://bugzilla.gnome.org/show_bug.cgi?id=755001
Diffstat (limited to 'src/compositor/compositor-xrender.c')
-rw-r--r--src/compositor/compositor-xrender.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 093e2c33..5080f80d 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -162,6 +162,8 @@ typedef struct _MetaCompWindow
gboolean damaged;
gboolean shaped;
+ XRectangle shape_bounds;
+
MetaCompWindowType type;
Damage damage;
@@ -1796,6 +1798,11 @@ add_win (MetaScreen *screen,
cw->damaged = FALSE;
cw->shaped = is_shaped (display, xwindow);
+ cw->shape_bounds.x = cw->attrs.x;
+ cw->shape_bounds.y = cw->attrs.y;
+ cw->shape_bounds.width = cw->attrs.width;
+ cw->shape_bounds.height = cw->attrs.height;
+
if (cw->attrs.class == InputOnly)
cw->damage = None;
else
@@ -1940,6 +1947,7 @@ resize_win (MetaCompWindow *cw,
Display *xdisplay = meta_display_get_xdisplay (display);
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
XserverRegion damage;
+ XserverRegion shape;
gboolean debug;
debug = DISPLAY_COMPOSITOR (display)->debug;
@@ -2031,6 +2039,10 @@ resize_win (MetaCompWindow *cw,
XFixesCopyRegion (xdisplay, damage, cw->extents);
}
+ shape = XFixesCreateRegion (xdisplay, &cw->shape_bounds, 1);
+ XFixesUnionRegion (xdisplay, damage, damage, shape);
+ XFixesDestroyRegion (xdisplay, shape);
+
dump_xserver_region ("resize_win", display, damage);
add_damage (screen, damage);
@@ -2389,6 +2401,21 @@ process_shape (MetaCompositorXRender *compositor,
if (event->shaped && !cw->shaped)
cw->shaped = TRUE;
+
+ if (event->shaped == True)
+ {
+ cw->shape_bounds.x = cw->attrs.x + event->x;
+ cw->shape_bounds.y = cw->attrs.y + event->y;
+ cw->shape_bounds.width = event->width;
+ cw->shape_bounds.height = event->height;
+ }
+ else
+ {
+ cw->shape_bounds.x = cw->attrs.x;
+ cw->shape_bounds.y = cw->attrs.y;
+ cw->shape_bounds.width = cw->attrs.width;
+ cw->shape_bounds.height = cw->attrs.height;
+ }
}
}