summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-21 09:11:59 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-10-21 09:34:56 -0700
commitc837d182c4674c01296bb7efd7d834d9dfd55f83 (patch)
treed6b64647d886df335044a43b30429f22445e88ec
parent2a9613980f93959eedf9396735785d4c50546e2d (diff)
XQuartz: Only send mouse events while in the background if we're over a visible window.
This "breaks" xeyes but gets rid of annoying tooltips. (cherry picked from commit 10090a132a0110fe24c8c886d9f53e6e947f8038)
-rw-r--r--hw/xquartz/X11Application.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 6e0b16e3b..c1a519436 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -959,6 +959,22 @@ static void send_nsevent(NSEvent *e) {
pDev = darwinTabletCurrent;
}
+ if(!quartzServerVisible) {
+ xp_window_id wid;
+
+ /* Sigh. Need to check that we're really over one of
+ * our windows. (We need to receive pointer events while
+ * not in the foreground, and the only way to do that
+ * right now is to ask for _all_ pointer events..)
+ */
+
+ wid = 0;
+ xp_find_window(pointer_x, pointer_y, 0, &wid);
+
+ if (wid == 0)
+ return;
+ }
+
DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y,
pressure, tilt_x, tilt_y);