summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 23:25:17 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-07 23:25:17 +0800
commitff16ed819390d058fae88975dcbb276cb4c8f277 (patch)
tree8f6dcd40d5fa245f480f8ef4f03ff3d4e2db6df4
parentfcb6a54eac1c194da6d649e9fbaa6fa7df879312 (diff)
downloadcompiz-with-glib-mainloop-ff16ed819390d058fae88975dcbb276cb4c8f277.tar.gz
compiz-with-glib-mainloop-ff16ed819390d058fae88975dcbb276cb4c8f277.tar.bz2
Correctly reflect that the switcher window is managed.
Forward port 46371f9172089a3e60648b834611d5694df2e80b to master
-rw-r--r--plugins/switcher/src/switcher.cpp13
-rw-r--r--plugins/switcher/src/switcher.h5
2 files changed, 17 insertions, 1 deletions
diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp
index 7a08aaa..7a25b9a 100644
--- a/plugins/switcher/src/switcher.cpp
+++ b/plugins/switcher/src/switcher.cpp
@@ -950,6 +950,14 @@ SwitchWindow::updateIconPos (int &wx,
wy = y + SPACE + ((HEIGHT - (SPACE << 1)) - height) / 2;
}
+
+/* Only for the popup window */
+bool
+SwitchWindow::managed ()
+{
+ return true;
+}
+
bool
SwitchWindow::glPaint (const GLWindowPaintAttrib &attrib,
const GLMatrix &transform,
@@ -1178,6 +1186,11 @@ SwitchWindow::SwitchWindow (CompWindow *window) :
GLWindowInterface::setHandler (gWindow, false);
CompositeWindowInterface::setHandler (cWindow, false);
+ if (window->id () == sScreen->popupWindow)
+ WindowInterface::setHandler (window, true);
+ else
+ WindowInterface::setHandler (window, false);
+
if (sScreen->popupWindow && sScreen->popupWindow == window->id ())
gWindow->glPaintSetEnabled (this, true);
}
diff --git a/plugins/switcher/src/switcher.h b/plugins/switcher/src/switcher.h
index dee22d2..68d3f2a 100644
--- a/plugins/switcher/src/switcher.h
+++ b/plugins/switcher/src/switcher.h
@@ -76,7 +76,7 @@ class SwitchScreen :
void windowRemove (CompWindow *w);
bool adjustVelocity ();
-
+
Window lastActiveWindow;
CompWindow *zoomedWindow;
@@ -100,6 +100,7 @@ class SwitchScreen :
class SwitchWindow :
public BaseSwitchWindow,
+ public WindowInterface,
public CompositeWindowInterface,
public GLWindowInterface,
public PluginClassHandler<SwitchWindow,CompWindow>
@@ -107,6 +108,8 @@ class SwitchWindow :
public:
SwitchWindow (CompWindow *window);
+ bool managed ();
+
bool damageRect (bool initial, const CompRect &rect);
bool glPaint (const GLWindowPaintAttrib &, const GLMatrix &,