diff options
author | Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> | 2011-01-12 14:50:30 +0200 |
---|---|---|
committer | Adam Endrodi <ext-adam.endrodi@nokia.com> | 2011-01-21 19:43:24 +0200 |
commit | 586b22f36c61baf4657e5bc20c9641e28adaf019 (patch) | |
tree | a64e8e1ce6671a59a0a6ab41abeb2bc38a878112 /src/mwindowpropertycache.h | |
parent | f7ecd5a5bdb687b609b4b1e37b5ad0847ae8aa35 (diff) |
Plug some leaks reported in NB#194581 and some robustness improvements
- MCompAtoms::getAtomArray: don't leak data even if it's in wrong format
- MCompAtoms::get_opacity_prop/getAtom(): init data to zero since API contract
does not say it's set to zero
- find_primary_output(): init contype to zero for the above reason; don't
leak contype even if the format is wrong
- unmapEvent(): skip synthetic UnmapNotifys; call XRemoveFromSaveSet() for
non-toplevels only
- mapRequestEvent(): Call XAddToSaveSet() for framed windows only (currently
commented out) because it does not make sense for top-levels
- mapEvent(): skip synthetic MapNotifys and MapNotifys for non-top-levels early
- x11EventFilter(): forget about windows reparented away from the root/frame
- All libxcb code: use _unchecked variants for all request functions, otherwise
we leak any errors (reaped with xcb_request_check())
- make glEGLImageTargetTexture2DOES static
- MTexturePixmapItem::init(): work also in case the window is unmapped (which
should not ever happen but the code checked it so make it work)
- MTexturePixmapItem::isDirectRendered(): no need to delete child QObject
- MTexturePixmapItem::cleanup(): it's enough to check egl_image to see if
needs to be freed
- MTexturePixmapItem::doTFP(): comment out the warning because it happens
during normal code execution (it's normal that windows get unmapped)
- MWindowPropertyCache::init(): mark wm_state_query initially false so it's
easier to understand for stupid developers like me
- MWindowPropertyCache::init_invalid(): initialise real_geom and statusbar_geom
because they can be accessed through public API even for invalid objects
- MWindowPropertyCache::MWindowPropertyCache(): remove warning -- it's normal
to have destroyed windows
- MWindowPropertyCache::~MWindowPropertyCache(): free custom_region for invalid
objects also; simplify code by using xcb_discard_reply() where possible (it's
also non-blocking)
- MWindowPropertyCache::hasAlpha(): don't return true for invalid objects
- MWindowPropertyCache::isDecorator(): assume false on failure
- MWindowPropertyCache::meegoStackingLayer(): assume 0 on failure
- MWindowPropertyCache::getWMHints(): don't leak when we have invalid object
and multiple calls
- MWindowPropertyCache::windowState(): it's enough to check wm_state_query;
assume MCompAtoms::NORMAL on failure
- MWindowPropertyCache::damageTracking(): invalid object does not need damage
Diffstat (limited to 'src/mwindowpropertycache.h')
-rw-r--r-- | src/mwindowpropertycache.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mwindowpropertycache.h b/src/mwindowpropertycache.h index cba854f..3611347 100644 --- a/src/mwindowpropertycache.h +++ b/src/mwindowpropertycache.h @@ -95,7 +95,8 @@ public: if (!shape_rects_valid) shapeRegion(); shape_rects_valid = false; - xcb_shape_rects_cookie = xcb_shape_get_rectangles(xcb_conn, window, + xcb_shape_rects_cookie = xcb_shape_get_rectangles_unchecked(xcb_conn, + window, ShapeBounding); } @@ -256,7 +257,7 @@ public: void damageTracking(bool enabled) { - if (damage_object && enabled) + if (!is_valid || (damage_object && enabled)) return; if (damage_object && !enabled) { XDamageDestroy(QX11Info::display(), damage_object); |