summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-13 22:26:14 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-13 22:26:14 +0800
commitc2e195a5eca99c3b03b740e1f609b900b6ef9a93 (patch)
tree0c95d369366f6aa4a03cf994963835aaae36f4a8
parenta493658e055c59226de31406fe622aec3d4a1c6f (diff)
downloadcompiz-with-glib-mainloop-c2e195a5eca99c3b03b740e1f609b900b6ef9a93.tar.gz
compiz-with-glib-mainloop-c2e195a5eca99c3b03b740e1f609b900b6ef9a93.tar.bz2
Don't catch resize notifications on startup
DecorWindow::update might call updateWindowOutputExtents which calls ::resizeNotify ... since this loops over all windows it is not safe to have this function called.
-rw-r--r--plugins/decor/src/decor.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index 333e554..c82d043 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -2084,6 +2084,17 @@ DecorWindow::DecorWindow (CompWindow *w) :
{
WindowInterface::setHandler (window);
+ /* FIXME :DecorWindow::update can call updateWindowOutputExtents
+ * which will call a zero-diff resizeNotify. Since this window
+ * might be part of a startup procedure, we can't assume that
+ * all other windows in the list are necessarily safe to use
+ * (since DecorWindow::DecorWindow might not have been called
+ * for them) so we need to turn off resize notifications
+ * and turn them back on once we're done updating the decoration
+ */
+
+ window->resizeNotifySetEnabled (this, false);
+
if (dScreen->cmActive)
{
gWindow = GLWindow::get (w);
@@ -2099,6 +2110,8 @@ DecorWindow::DecorWindow (CompWindow *w) :
if (w->shaded () || w->isViewable ())
update (true);
+
+ window->resizeNotifySetEnabled (this, true);
}