summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-04 20:02:01 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-04 20:02:01 +0800
commit3e8a344635d443a0b04671c198e3c39db49df52b (patch)
treeb8b68e1289b53a6c1b5fbc7aaf3b57fcc6325f5e
parentf280dbcd36a0d8c5451b373d6413e91ddb7c0023 (diff)
downloadunity-window-decorator-3e8a344635d443a0b04671c198e3c39db49df52b.tar.gz
unity-window-decorator-3e8a344635d443a0b04671c198e3c39db49df52b.tar.bz2
Wait until reparent to decorate
-rw-r--r--plugins/decor/src/decor.cpp19
-rw-r--r--plugins/decor/src/decor.h4
2 files changed, 16 insertions, 7 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index ff3bdd2..da10c94 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -669,7 +669,7 @@ DecorWindow::update (bool allowDecoration)
case CompWindowTypeMenuMask:
case CompWindowTypeNormalMask:
if (window->mwmDecor () & (MwmDecorAll | MwmDecorTitle))
- decorate = window->managed ();
+ decorate = true;
default:
break;
}
@@ -1231,6 +1231,18 @@ DecorWindow::updateWindowRegions ()
}
void
+DecorWindow::windowNotify (CompWindowNotify n)
+{
+ if (n == CompWindowNotifyReparent)
+ {
+ DecorWindow::get (window)->update (true);
+ window->windowNotifySetEnabled (this, false);
+ }
+
+ window->windowNotify (n);
+}
+
+void
DecorScreen::handleEvent (XEvent *event)
{
Window activeWindow = screen->activeWindow ();
@@ -1245,11 +1257,6 @@ DecorScreen::handleEvent (XEvent *event)
checkForDm (true);
}
break;
- case MapRequest:
- w = screen->findWindow (event->xmaprequest.window);
- if (w)
- DecorWindow::get (w)->update (true);
- break;
case ClientMessage:
if (event->xclient.message_type == requestFrameExtentsAtom)
{
diff --git a/plugins/decor/src/decor.h b/plugins/decor/src/decor.h
index fac6599..9545807 100644
--- a/plugins/decor/src/decor.h
+++ b/plugins/decor/src/decor.h
@@ -123,7 +123,7 @@ class DecorScreen :
void checkForDm (bool);
bool decoratorStartTimeout ();
-
+
void updateDefaultShadowProperty ();
public:
@@ -178,6 +178,8 @@ class DecorWindow :
bool glDraw (const GLMatrix &, GLFragment::Attrib &,
const CompRegion &, unsigned int);
+ void windowNotify (CompWindowNotify n);
+
void updateDecoration ();
void setDecorationMatrices ();