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)
This commit is contained in:
Jeremy Huddleston 2008-10-21 09:11:59 -07:00
parent 2a9613980f
commit c837d182c4

View File

@ -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);