summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Burgmeier <[email protected]>2017-11-08 16:14:11 +0100
committermonsta <[email protected]>2018-03-02 15:05:32 +0300
commit36f7928088b7919b8e241c163ed8f701c5342b85 (patch)
tree3a831d606767bb6967364426520542aa81b9d884
parenta17f588b7ff2a97c94d42650fff52b9dc0091f8e (diff)
downloadmarco-36f7928088b7919b8e241c163ed8f701c5342b85.tar.bz2
marco-36f7928088b7919b8e241c163ed8f701c5342b85.tar.xz
XFIXES regions are leaked during paint_windows if more than one
META_COMP_WINDOW_DESKTOP is available (#329)
-rw-r--r--src/compositor/compositor-xrender.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 04e89f66..1679f06e 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -1216,8 +1216,15 @@ paint_windows (MetaScreen *screen,
if (cw->type == META_COMP_WINDOW_DESKTOP)
{
- desktop_region = XFixesCreateRegion (xdisplay, 0, 0);
- XFixesCopyRegion (xdisplay, desktop_region, paint_region);
+ if(desktop_region)
+ {
+ XFixesUnionRegion (xdisplay, desktop_region, desktop_region, paint_region);
+ }
+ else
+ {
+ desktop_region = XFixesCreateRegion (xdisplay, 0, 0);
+ XFixesCopyRegion (xdisplay, desktop_region, paint_region);
+ }
}
XFixesSubtractRegion (xdisplay, paint_region,