Xi: Drop unused parameters from DeliverTouchEmulatedEvent

The parameters client and mask are set within the function, but
otherwise unused, so there's no reason to pass them in the first place.
Since this is a static function, ABI remains unaffected.

Signed-off-by: Aggelos Tselios <aggelostselios777@gmail.com>
This commit is contained in:
Aggelos Tselios
2026-02-10 01:40:49 +02:00
committed by Enrico Weigelt
parent 95b9bf6dc3
commit 92604954f8

View File

@@ -1443,8 +1443,7 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
static int static int
DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
InternalEvent *ev, TouchListener * listener, InternalEvent *ev, TouchListener * listener,
ClientPtr client, WindowPtr win, GrabPtr grab, WindowPtr win, GrabPtr grab)
XI2Mask *xi2mask)
{ {
InternalEvent motion, button; InternalEvent motion, button;
InternalEvent *ptrev = &motion; InternalEvent *ptrev = &motion;
@@ -1454,11 +1453,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
/* There may be a pointer grab on the device */ /* There may be a pointer grab on the device */
if (!grab) { if (!grab) {
grab = dev->deviceGrab.grab; grab = dev->deviceGrab.grab;
if (grab) { if (grab) win = grab->window;
win = grab->window;
xi2mask = grab->xi2mask;
client = dixClientForGrab(grab);
}
} }
/* We don't deliver pointer events to non-owners */ /* We don't deliver pointer events to non-owners */
@@ -1590,8 +1585,7 @@ DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
&mask)) &mask))
return; return;
DeliverTouchEmulatedEvent(dev, ti, &motion, &ti->listeners[0], client, DeliverTouchEmulatedEvent(dev, ti, &motion, &ti->listeners[0], win, grab);
win, grab, mask);
} }
else { else {
InternalEvent button; InternalEvent button;
@@ -2032,8 +2026,7 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (listener->type == TOUCH_LISTENER_POINTER_REGULAR || if (listener->type == TOUCH_LISTENER_POINTER_REGULAR ||
listener->type == TOUCH_LISTENER_POINTER_GRAB) { listener->type == TOUCH_LISTENER_POINTER_GRAB) {
rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, win, grab);
grab, xi2mask);
if (rc == Success) { if (rc == Success) {
listener->state = TOUCH_LISTENER_IS_OWNER; listener->state = TOUCH_LISTENER_IS_OWNER;
/* async grabs cannot replay, so automatically accept this touch */ /* async grabs cannot replay, so automatically accept this touch */
@@ -2086,8 +2079,7 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
* This is part two of the hack in DeactivatePointerGrab * This is part two of the hack in DeactivatePointerGrab
*/ */
if (listener->state != TOUCH_LISTENER_HAS_END) { if (listener->state != TOUCH_LISTENER_HAS_END) {
rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, win, grab);
grab, xi2mask);
/* Once we send a TouchEnd to a legacy listener, we're already well /* Once we send a TouchEnd to a legacy listener, we're already well
* past the accepting/rejecting stage (can only happen on * past the accepting/rejecting stage (can only happen on
@@ -2165,8 +2157,7 @@ DeliverTouchEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
else if (ev->any.type == ET_TouchUpdate) { else if (ev->any.type == ET_TouchUpdate) {
if (listener->type == TOUCH_LISTENER_POINTER_REGULAR || if (listener->type == TOUCH_LISTENER_POINTER_REGULAR ||
listener->type == TOUCH_LISTENER_POINTER_GRAB) listener->type == TOUCH_LISTENER_POINTER_GRAB)
DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, DeliverTouchEmulatedEvent(dev, ti, ev, listener, win, grab);
xi2mask);
else if (TouchResourceIsOwner(ti, listener->listener) || else if (TouchResourceIsOwner(ti, listener->listener) ||
has_ownershipmask) has_ownershipmask)
rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);