summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-06-09 22:58:11 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-06-09 22:58:11 +0800
commit6fc939dca0ff1e54ce2bfe7ac6a233026fb56f05 (patch)
treedc86a0c4ba58cb07398721a39551c2b03805d0f7 /src
parent9e6c11d3040e5bd4d68af354f9c0147739d9548d (diff)
parenta282abac5bd41ca920263f11e510b715f84bcdc3 (diff)
downloadmobilebling-6fc939dca0ff1e54ce2bfe7ac6a233026fb56f05.tar.gz
mobilebling-6fc939dca0ff1e54ce2bfe7ac6a233026fb56f05.tar.bz2
Fixes LP#761616
------------ This line and the following will be ignored -------------- modified: src/screen.cpp src/window.cpp unknown: build/ po/compiz.pot pending merges: Sam Spilsbury 2011-05-25 Restore selected event masks already rather tha...
Diffstat (limited to 'src')
-rw-r--r--src/screen.cpp6
-rw-r--r--src/window.cpp14
2 files changed, 14 insertions, 6 deletions
diff --git a/src/screen.cpp b/src/screen.cpp
index cd685af..9005411 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -4558,9 +4558,11 @@ CompScreen::init (const char *name)
XA_ATOM, 32, PropModeReplace,
(unsigned char *) &xdndVersion, 1);
+ /* CompWindow::CompWindow will select for
+ * crossing events when it gets called on
+ * CreateNotify of this window, so no need
+ * to select for them here */
XSelectInput (dpy, priv->screenEdge[i].id,
- EnterWindowMask |
- LeaveWindowMask |
ButtonPressMask |
ButtonReleaseMask |
PointerMotionMask);
diff --git a/src/window.cpp b/src/window.cpp
index acb7429..7262c70 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -5296,6 +5296,7 @@ CompWindow::CompWindow (Window aboveId,
priv->clientLeader = None;
XSelectInput (screen->dpy (), priv->id,
+ wa.your_event_mask |
PropertyChangeMask |
EnterWindowMask |
FocusChangeMask);
@@ -5907,8 +5908,8 @@ PrivateWindow::reparent ()
/* Reparent the client into the wrapper window */
XReparentWindow (dpy, id, wrapper, 0, 0);
- attr.event_mask = PropertyChangeMask | FocusChangeMask |
- EnterWindowMask | LeaveWindowMask;
+ /* Restore events */
+ attr.event_mask = attrib.your_event_mask;
/* We don't care about client events on the frame, and listening for them
* will probably end up fighting the client anyways, so disable them */
@@ -5973,6 +5974,7 @@ PrivateWindow::unreparent ()
XWindowChanges xwc;
unsigned int nchildren;
Window *children = NULL, root_return, parent_return;
+ XWindowAttributes wa;
if (!frame)
return;
@@ -5984,6 +5986,11 @@ PrivateWindow::unreparent ()
XPutBackEvent (dpy, &e);
alive = false;
}
+ else
+ {
+ if (!XGetWindowAttributes (dpy, id, &wa))
+ alive = false;
+ }
/* Also don't reparent back into root windows that have ended up
* reparented into other windows (and as such we are unmanaging them) */
@@ -6019,8 +6026,7 @@ PrivateWindow::unreparent ()
XUnmapWindow (dpy, frame);
- XSelectInput (dpy, id, PropertyChangeMask | EnterWindowMask |
- FocusChangeMask);
+ XSelectInput (dpy, id, wa.your_event_mask);
XSelectInput (dpy, screen->root (),
SubstructureRedirectMask |