dix: events: clean up XaceHookSendAccess() client arg

Use NullClient macro instead of NULL or 0.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-03-17 14:16:21 +01:00
parent 6f675e4d01
commit 261c49b4c2

View File

@ -2810,7 +2810,7 @@ DeliverEvent(DeviceIntPtr dev, xEvent *xE, int count,
Mask filter; Mask filter;
int deliveries = 0; int deliveries = 0;
if (XaceHookSendAccess(NULL, dev, win, xE, count) == Success) { if (XaceHookSendAccess(NullClient, dev, win, xE, count) == Success) {
filter = GetEventFilter(dev, xE); filter = GetEventFilter(dev, xE);
FixUpEventFromWindow(pSprite, xE, win, child, FALSE); FixUpEventFromWindow(pSprite, xE, win, child, FALSE);
deliveries = DeliverEventsToWindow(dev, win, xE, count, filter, grab); deliveries = DeliverEventsToWindow(dev, win, xE, count, filter, grab);
@ -4235,7 +4235,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
rc = EventToXI(event, &xE, &count); rc = EventToXI(event, &xE, &count);
if (rc == Success && if (rc == Success &&
XaceHookSendAccess(NULL, keybd, focus, xE, count) == Success) { XaceHookSendAccess(NullClient, keybd, focus, xE, count) == Success) {
FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE); FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE);
deliveries = DeliverEventsToWindow(keybd, focus, xE, count, deliveries = DeliverEventsToWindow(keybd, focus, xE, count,
GetEventFilter(keybd, xE), NullGrab); GetEventFilter(keybd, xE), NullGrab);
@ -4251,7 +4251,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
if (sendCore) { if (sendCore) {
rc = EventToCore(event, &core, &count); rc = EventToCore(event, &core, &count);
if (rc == Success) { if (rc == Success) {
if (XaceHookSendAccess(NULL, keybd, focus, core, count) == if (XaceHookSendAccess(NullClient, keybd, focus, core, count) ==
Success) { Success) {
FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus, FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus,
None, FALSE); None, FALSE);
@ -4324,7 +4324,7 @@ DeliverOneGrabbedEvent(InternalEvent *event, DeviceIntPtr dev,
if (rc == Success) { if (rc == Success) {
FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE); FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE);
if (XaceHookSendAccess(0, dev, grab->window, xE, count) || if (XaceHookSendAccess(NullClient, dev, grab->window, xE, count) ||
XaceHookReceiveAccess(rClient(grab), grab->window, xE, count)) XaceHookReceiveAccess(rClient(grab), grab->window, xE, count))
deliveries = 1; /* don't send, but pretend we did */ deliveries = 1; /* don't send, but pretend we did */
else if (level != CORE || !IsInterferingGrab(rClient(grab), dev, xE)) { else if (level != CORE || !IsInterferingGrab(rClient(grab), dev, xE)) {