summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 00:20:19 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-21 00:20:19 +0800
commit817677124de0b32df7a851c2ac13cdf675576b90 (patch)
tree5fcb5695be8033e8d7027cb1ae0d6e70b8784f98
parent64be74d58b052a22ccb8fb7c0f4889967fc7962f (diff)
downloadcompiz-with-glib-mainloop-817677124de0b32df7a851c2ac13cdf675576b90.tar.gz
compiz-with-glib-mainloop-817677124de0b32df7a851c2ac13cdf675576b90.tar.bz2
Read w->input () rather than the internal input extents.
This provides information about the current state of the decoration extents in core, rather than our own information about the window decoration itself. Reverts part of 4ae95852e53075caed15586620127f0c1405fe474 Fixes unresponsive decorations in kde4-window-decorator and decorations initially "not responding" when you click on them (b.c.o #20)
-rw-r--r--plugins/decor/src/decor.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/decor/src/decor.cpp b/plugins/decor/src/decor.cpp
index c82d043..985ab5c 100644
--- a/plugins/decor/src/decor.cpp
+++ b/plugins/decor/src/decor.cpp
@@ -989,10 +989,8 @@ DecorWindow::update (bool allowDecoration)
void
DecorWindow::updateFrame ()
{
- if (!wd || !(wd->decor->input.left || wd->decor->input.left ||
- wd->decor->input.left || wd->decor->input.bottom) ||
- !(wd->decor->maxInput.left || wd->decor->maxInput.left ||
- wd->decor->maxInput.left || wd->decor->maxInput.bottom) ||
+ if (!wd || !(window->input ().left || window->input ().right ||
+ window->input ().top || window->input ().bottom) ||
(wd->decor->type == WINDOW_DECORATION_TYPE_PIXMAP && outputFrame) ||
(wd->decor->type == WINDOW_DECORATION_TYPE_WINDOW && inputFrame))
{
@@ -1001,6 +999,7 @@ DecorWindow::updateFrame ()
XDeleteProperty (screen->dpy (), window->id (),
dScreen->inputFrameAtom);
XDestroyWindow (screen->dpy (), inputFrame);
+
inputFrame = None;
frameRegion = CompRegion ();
@@ -1026,10 +1025,8 @@ DecorWindow::updateFrame ()
oldHeight = 0;
}
}
- if (wd && (wd->decor->input.left || wd->decor->input.left ||
- wd->decor->input.left || wd->decor->input.bottom ||
- wd->decor->maxInput.left || wd->decor->maxInput.left ||
- wd->decor->maxInput.left || wd->decor->maxInput.bottom))
+ if (wd && (window->input ().left || window->input ().right ||
+ window->input ().top || window->input ().bottom))
{
if (wd->decor->type == WINDOW_DECORATION_TYPE_PIXMAP)
updateInputFrame ();