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:11:59 -0700
commit10090a132a0110fe24c8c886d9f53e6e947f8038 (patch)
tree6a46f85caffd733bf58e63372a869ba19115b011
parent22a54e46176c9cbdfaaa59ef33a6ae6a9c4969ef (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.
-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 c1dee431e..4851b3122 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -941,6 +941,22 @@ extern int darwin_modifier_flags; // darwinEvents.c
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);