dix: XineramaTryClientEventsResult() change return type to Bool
Callers are only interested in whether event was actually sent (retval==1) or not, so Bool is sufficient and easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
09f46c97b6
commit
8a49bfaa5b
12
dix/events.c
12
dix/events.c
|
@ -2521,18 +2521,18 @@ DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
|
|||
*/
|
||||
|
||||
#ifdef XINERAMA
|
||||
static int
|
||||
static inline Bool
|
||||
XineramaTryClientEventsResult(ClientPtr client,
|
||||
GrabPtr grab, Mask mask, Mask filter)
|
||||
{
|
||||
if ((client) && (client != serverClient) && (!client->clientGone) &&
|
||||
((filter == CantBeFiltered) || (mask & filter))) {
|
||||
if (grab && !SameClient(grab, client))
|
||||
return -1;
|
||||
return FALSE;
|
||||
else
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
#endif /* XINERAMA */
|
||||
|
||||
|
@ -2556,7 +2556,7 @@ Bool MaybeDeliverEventToClient(WindowPtr pWin, xEvent *pEvents,
|
|||
#ifdef XINERAMA
|
||||
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||
return XineramaTryClientEventsResult(wClient(pWin), NullGrab,
|
||||
pWin->eventMask, filter) == 1;
|
||||
pWin->eventMask, filter);
|
||||
#endif /* XINERAMA */
|
||||
if (XaceHookReceiveAccess(wClient(pWin), pWin, pEvents, 1))
|
||||
return TRUE; /* don't send, but pretend we did */
|
||||
|
@ -2570,7 +2570,7 @@ Bool MaybeDeliverEventToClient(WindowPtr pWin, xEvent *pEvents,
|
|||
#ifdef XINERAMA
|
||||
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||
return XineramaTryClientEventsResult(rClient(other), NullGrab,
|
||||
other->mask, filter) == 1;
|
||||
other->mask, filter);
|
||||
#endif /* XINERAMA */
|
||||
if (XaceHookReceiveAccess(rClient(other), pWin, pEvents, 1))
|
||||
return TRUE; /* don't send, but pretend we did */
|
||||
|
|
Loading…
Reference in New Issue