From 5c0b851cc6342ab4cf5996efaeb8b3dbcbf9b490 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Fri, 14 Sep 2012 15:31:14 +0100 Subject: [PATCH] Remove _NET_FRAME_EXTENTS on shutdown. After we exit there are no window decorations therefore frame extents are meaningless. We could be left with parts of the window being the wrong opacity if the property is left intact and a compositing manager configured to draw decorations with a different opacity to the rest of the window is still running. Remove the _NET_FRAME_EXTENTS property from all windows when we shut down to prevent windows from being drawn incorrectly after we're gone. --- src/window.c | 2 ++ src/wmspec.c | 5 +++++ src/wmspec.h | 1 + 3 files changed, 8 insertions(+) diff --git a/src/window.c b/src/window.c index e7b1036f..12f276a9 100644 --- a/src/window.c +++ b/src/window.c @@ -1617,6 +1617,8 @@ void wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed) wApplicationDeactivate(oapp); } + wNETCleanupFrameExtents(wwin); + wWindowDestroy(wwin); XFlush(dpy); } diff --git a/src/wmspec.c b/src/wmspec.c index 56cab826..db3526fd 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -1642,3 +1642,8 @@ void wNETFrameExtents(WWindow *wwin) XChangeProperty(dpy, wwin->client_win, net_frame_extents, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) extents, 4); } + +void wNETCleanupFrameExtents(WWindow *wwin) +{ + XDeleteProperty(dpy, wwin->client_win, net_frame_extents); +} diff --git a/src/wmspec.h b/src/wmspec.h index 47c4c766..03376846 100644 --- a/src/wmspec.h +++ b/src/wmspec.h @@ -45,4 +45,5 @@ int wNETWMGetCurrentDesktopFromHint(WScreen *scr); char *wNETWMGetIconName(Window window); char *wNETWMGetWindowName(Window window); void wNETFrameExtents(WWindow *wwin); +void wNETCleanupFrameExtents(WWindow *wwin); #endif