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
|
#ifdef XINERAMA
|
||||||
static int
|
static inline Bool
|
||||||
XineramaTryClientEventsResult(ClientPtr client,
|
XineramaTryClientEventsResult(ClientPtr client,
|
||||||
GrabPtr grab, Mask mask, Mask filter)
|
GrabPtr grab, Mask mask, Mask filter)
|
||||||
{
|
{
|
||||||
if ((client) && (client != serverClient) && (!client->clientGone) &&
|
if ((client) && (client != serverClient) && (!client->clientGone) &&
|
||||||
((filter == CantBeFiltered) || (mask & filter))) {
|
((filter == CantBeFiltered) || (mask & filter))) {
|
||||||
if (grab && !SameClient(grab, client))
|
if (grab && !SameClient(grab, client))
|
||||||
return -1;
|
return FALSE;
|
||||||
else
|
else
|
||||||
return 1;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return 0;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
@ -2556,7 +2556,7 @@ Bool MaybeDeliverEventToClient(WindowPtr pWin, xEvent *pEvents,
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||||
return XineramaTryClientEventsResult(wClient(pWin), NullGrab,
|
return XineramaTryClientEventsResult(wClient(pWin), NullGrab,
|
||||||
pWin->eventMask, filter) == 1;
|
pWin->eventMask, filter);
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
if (XaceHookReceiveAccess(wClient(pWin), pWin, pEvents, 1))
|
if (XaceHookReceiveAccess(wClient(pWin), pWin, pEvents, 1))
|
||||||
return TRUE; /* don't send, but pretend we did */
|
return TRUE; /* don't send, but pretend we did */
|
||||||
|
@ -2570,7 +2570,7 @@ Bool MaybeDeliverEventToClient(WindowPtr pWin, xEvent *pEvents,
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
|
||||||
return XineramaTryClientEventsResult(rClient(other), NullGrab,
|
return XineramaTryClientEventsResult(rClient(other), NullGrab,
|
||||||
other->mask, filter) == 1;
|
other->mask, filter);
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
if (XaceHookReceiveAccess(rClient(other), pWin, pEvents, 1))
|
if (XaceHookReceiveAccess(rClient(other), pWin, pEvents, 1))
|
||||||
return TRUE; /* don't send, but pretend we did */
|
return TRUE; /* don't send, but pretend we did */
|
||||||
|
|
Loading…
Reference in New Issue