diff options
author | Richard Grenville <[email protected]> | 2014-08-03 19:40:40 +0800 |
---|---|---|
committer | Richard Grenville <[email protected]> | 2014-08-03 19:40:40 +0800 |
commit | ebab3dc5061e58da34eed227e8f98965bdd1bc30 (patch) | |
tree | 61e81f85f8af76d7a982d183660200e2e036e6c2 /compton.c | |
parent | 66b420aa62d28af6f6e7b064f58db446829b4f6a (diff) | |
download | tdebase-ebab3dc5061e58da34eed227e8f98965bdd1bc30.tar.gz tdebase-ebab3dc5061e58da34eed227e8f98965bdd1bc30.zip |
Bug fix: Fix X pixmap leakage in shadow_paint
- Fix X pixmap leakage in shadow_paint.
- Add the skeleton of a X resource leakage checker.
Diffstat (limited to 'compton.c')
-rw-r--r-- | compton.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -486,7 +486,9 @@ win_build_shadow(session_t *ps, win *w, double opacity) { shadow_picture_argb, 0, 0, 0, 0, 0, 0, shadow_image->width, shadow_image->height); + assert(!w->shadow_paint.pixmap); w->shadow_paint.pixmap = shadow_pixmap_argb; + assert(!w->shadow_paint.pict); w->shadow_paint.pict = shadow_picture_argb; // Sync it once and only once @@ -1826,7 +1828,7 @@ paint_all(session_t *ps, XserverRegion region, XserverRegion region_real, win *t // Painting shadow if (w->shadow) { // Lazy shadow building - if (!paint_isvalid(ps, &w->shadow_paint)) + if (!w->shadow_paint.pixmap) win_build_shadow(ps, w, 1); // Shadow is to be painted based on the ignore region of current @@ -7510,6 +7512,11 @@ session_destroy(session_t *ps) { // Flush all events XSync(ps->dpy, True); +#ifdef DEBUG_XRC + // Report about resource leakage + xrc_report_xid(); +#endif + // Free timeouts ps->tmout_unredir = NULL; timeout_clear(ps); |