diff options
author | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-01-28 18:51:03 +0800 |
---|---|---|
committer | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-01-28 18:51:03 +0800 |
commit | eda4ce59d1010289f1cdd62e4ce03a3517dd61da (patch) | |
tree | ad1fd2f7d453c5ae1d495748233fad6faa89fe1c | |
parent | 3fa322237fbab4316ad7d114d01b62e4c2fd0db8 (diff) | |
download | mobileperf-eda4ce59d1010289f1cdd62e4ce03a3517dd61da.tar.gz mobileperf-eda4ce59d1010289f1cdd62e4ce03a3517dd61da.tar.bz2 |
Fix frame reference not going away on unreparent
-rw-r--r-- | plugins/decor/src/decor.cpp | 27 |
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) { |