From 6cf1369769b94165c3360945deb47621e957c603 Mon Sep 17 00:00:00 2001 From: Jan Burgmeier Date: Wed, 8 Nov 2017 16:14:11 +0100 Subject: XFIXES regions are leaked during paint_windows if more than one META_COMP_WINDOW_DESKTOP is available (#329) --- src/compositor/compositor-xrender.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c index 75171cbc..8b0c43e5 100644 --- a/src/compositor/compositor-xrender.c +++ b/src/compositor/compositor-xrender.c @@ -1321,8 +1321,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, -- cgit v1.2.1