XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check

(cherry picked from commit 5fc73b1141eca8b678e54412ca33afa31a76d088)
This commit is contained in:
Jeremy Huddleston 2008-10-31 12:37:32 -07:00
parent 227d782a1b
commit 31907986a6

View File

@ -967,23 +967,21 @@ static void send_nsevent(NSEvent *e) {
pDev = darwinTabletCurrent;
}
#if 0 // XPlugin isn't thread safe ... sigh
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..)
* not in the foreground, but we don't want to receive them
* when another window is over us or we might show a tooltip)
*/
wid = 0;
xp_find_window(pointer_x, pointer_y, 0, &wid);
if (wid == 0)
if (xp_find_window(pointer_x, pointer_y, 0, &wid) == XP_Success &&
wid == 0)
return;
}
#endif
DarwinSendPointerEvents(pDev, ev_type, ev_button, pointer_x, pointer_y,
pressure, tilt_x, tilt_y);