summaryrefslogtreecommitdiff
path: root/plugins/switcher
diff options
context:
space:
mode:
authorSam Spilsbury <SmSpillaz@gmail.com>2010-05-12 23:56:31 +0800
committerSam Spilsbury <SmSpillaz@gmail.com>2010-05-12 23:56:31 +0800
commitb7e49e10152135b5532e473027ba422e22da1735 (patch)
tree1a61a62d1037bb55d17c3ad3064ed22e09e2d068 /plugins/switcher
parentebf5658a4a6042bc7d4dc028e83e3f0a82bfc5d8 (diff)
downloadcompiz-with-glib-mainloop-b7e49e10152135b5532e473027ba422e22da1735.tar.gz
compiz-with-glib-mainloop-b7e49e10152135b5532e473027ba422e22da1735.tar.bz2
Use configureXWindow and XConfigureWindow respectively instead of ::resize.
::resize and XMoveResizeWindow are mostly functions for internal use and they don't correclty configure the window the way we need it. This results in some weird display artefacts with the switcher popup window
Diffstat (limited to 'plugins/switcher')
-rw-r--r--plugins/switcher/src/switcher.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp
index 7cf64d1..d7a8f8c 100644
--- a/plugins/switcher/src/switcher.cpp
+++ b/plugins/switcher/src/switcher.cpp
@@ -77,17 +77,20 @@ SwitchScreen::updateWindowList (int count)
{
CompWindow *w = screen->findWindow (popupWindow);
+ XWindowChanges xwc;
+ unsigned int valueMask = 0;
+
+ valueMask |= (CWX | CWY | CWWidth | CWHeight);
+
+ xwc.x = x - WINDOW_WIDTH (count) / 2;
+ xwc.y = y - WINDOW_HEIGHT / 2;
+ xwc.width = WINDOW_WIDTH (count);
+ xwc.height = WINDOW_HEIGHT;
+
if (w)
- w->resize (x - WINDOW_WIDTH (count) / 2,
- y - WINDOW_HEIGHT / 2,
- WINDOW_WIDTH (count),
- WINDOW_HEIGHT);
+ w->configureXWindow (valueMask, &xwc);
else
- XMoveResizeWindow (screen->dpy (), popupWindow,
- x - WINDOW_WIDTH (count) / 2,
- y - WINDOW_HEIGHT / 2,
- (unsigned) WINDOW_WIDTH (count),
- (unsigned) WINDOW_HEIGHT);
+ XConfigureWindow (screen->dpy (), popupWindow, valueMask, &xwc);
}
}