diff options
author | marha <marha@users.sourceforge.net> | 2011-12-05 07:42:31 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-05 07:42:31 +0100 |
commit | 528f5bd58a139174170c4130c67dca30193c9057 (patch) | |
tree | 550c818095dbc607deaddf166c77116ccd91ef54 /xorg-server/dix/events.c | |
parent | 2cfebffb491807a465a8e5f7daca582d8aefb829 (diff) | |
download | vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.gz vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.bz2 vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.zip |
xserver xkeyboard-config mesa git update 5 dec 2011
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 5e0dc5f17..4847db005 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -469,10 +469,11 @@ GetXI2MaskByte(unsigned char xi2mask[][XI2MASKSIZE], DeviceIntPtr dev, int event /** - * Return the windows complete XI2 mask for the given XI2 event type. + * @return TRUE if the mask is set for this event from this device on the + * window, or FALSE otherwise. */ -Mask -GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev) +Bool +WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent* ev) { OtherInputMasks *inputMasks = wOtherInputMasks(win); int filter; @@ -484,7 +485,7 @@ GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev) evtype = ((xGenericEvent*)ev)->evtype; filter = GetEventFilter(dev, ev); - return (GetXI2MaskByte(inputMasks->xi2mask, dev, evtype) & filter); + return !!(GetXI2MaskByte(inputMasks->xi2mask, dev, evtype) & filter); } Mask @@ -2075,7 +2076,7 @@ GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win, { OtherInputMasks *inputMasks = wOtherInputMasks(win); /* Has any client selected for the event? */ - if (!GetWindowXI2Mask(dev, win, events)) + if (!WindowXI2MaskIsset(dev, win, events)) goto out; *clients = inputMasks->inputClients; } else { @@ -3787,14 +3788,13 @@ CheckPassiveGrabsOnWindow( } if (!activate) - { - return grab; - } + break; else if (!GetXIType(event) && !GetCoreType(event)) { ErrorF("Event type %d in CheckPassiveGrabsOnWindow is neither" " XI 1.x nor core\n", event->any.type); - return NULL; + grab = NULL; + break; } /* The only consumers of corestate are Xi 1.x and core events, which @@ -3860,9 +3860,10 @@ CheckPassiveGrabsOnWindow( } free(xE); - return grab; + break; } - return NULL; + + return grab; #undef CORE_MATCH #undef XI_MATCH #undef XI2_MATCH @@ -4632,7 +4633,7 @@ DeviceEnterLeaveEvent( TryClientEvents(rClient(grab), mouse, (xEvent*)event, 1, mask, filter, grab); } else { - if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event)) + if (!WindowXI2MaskIsset(mouse, pWin, (xEvent*)event)) goto out; DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter, NullGrab); |