summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-01-28 18:51:03 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-01-28 18:51:03 +0800
commiteda4ce59d1010289f1cdd62e4ce03a3517dd61da (patch)
treead1fd2f7d453c5ae1d495748233fad6faa89fe1c
parent3fa322237fbab4316ad7d114d01b62e4c2fd0db8 (diff)
downloadmobileperf-eda4ce59d1010289f1cdd62e4ce03a3517dd61da.tar.gz
mobileperf-eda4ce59d1010289f1cdd62e4ce03a3517dd61da.tar.bz2
Fix frame reference not going away on unreparent
-rw-r--r--plugins/decor/src/decor.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 49b382f..9c34534 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -1253,8 +1253,34 @@ DecorWindow::updateWindowRegions ()
void
DecorWindow::windowNotify (CompWindowNotify n)
{
+ DECOR_SCREEN (screen);
+
switch (n)
{
+ case CompWindowNotifyUnreparent:
+ /* We don't get a DestroyNotify when the wrapper window
+ * or frame window gets destroyed, which destroys our
+ * window too, so we need to manually
+ * remove our input frame window and property here
+ * FIXME: the decoration manager might not like this -
+ * maybe add a CompWindowNotifyBeforeUnreparent so that we
+ * can tell it that the window is about to go away
+ */
+ if (inputFrame)
+ {
+ inputFrame = None;
+ XDeleteProperty (screen->dpy (), window->id (),
+ ds->inputFrameAtom);
+ }
+ else if (outputFrame)
+ {
+ outputFrame = None;
+ XDeleteProperty (screen->dpy (), window->id (),
+ ds->outputFrameAtom);
+ }
+
+ break;
+
case CompWindowNotifyReparent:
update (true);
break;
@@ -1407,6 +1433,7 @@ DecorScreen::handleEvent (XEvent *event)
}
break;
case DestroyNotify:
+ /* Only for when the client window gets destroyed */
w = screen->findTopLevelWindow (event->xproperty.window);
if (w)
{