diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-03 14:54:06 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-11-29 15:12:35 +1000 |
commit | b371795f01c1d7fc338cfe18b8a567ed9f402846 (patch) | |
tree | e1fa5a80ee87f86fc54fb082a8bf855d914c89c1 | |
parent | bedb8fd90de8e2db33d5e3b1d859f24bf34efc9a (diff) |
dix: rename GetWindowXI2Mask to WindowXI2MaskIsset
And let it return a boolean value, that's all the callers need anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r-- | dix/events.c | 13 | ||||
-rw-r--r-- | include/input.h | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/dix/events.c b/dix/events.c index 5e0dc5f17..35b446b2b 100644 --- a/dix/events.c +++ b/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 { @@ -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); diff --git a/include/input.h b/include/input.h index 87bb2aa01..8e7b47a4c 100644 --- a/include/input.h +++ b/include/input.h @@ -535,7 +535,7 @@ extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs); /* misc event helpers */ extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients); extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); -extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev); +extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent* ev); void FixUpEventFromWindow(SpritePtr pSprite, xEvent *xE, WindowPtr pWin, |