mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix: move EmitTouchEnd to touch.c
No functional changes, this just enables it to be re-used easier. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
27
dix/touch.c
27
dix/touch.c
@@ -1075,3 +1075,30 @@ TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
|
||||
|
||||
FreeEventList(eventlist, GetMaximumEventsNum());
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate and deliver a TouchEnd event.
|
||||
*
|
||||
* @param dev The device to deliver the event for.
|
||||
* @param ti The touch point record to deliver the event for.
|
||||
* @param flags Internal event flags. The called does not need to provide
|
||||
* TOUCH_CLIENT_ID and TOUCH_POINTER_EMULATED, this function will ensure
|
||||
* they are set appropriately.
|
||||
* @param resource The client resource to deliver to, or 0 for all clients.
|
||||
*/
|
||||
void
|
||||
TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource)
|
||||
{
|
||||
InternalEvent event;
|
||||
|
||||
/* We're not processing a touch end for a frozen device */
|
||||
if (dev->deviceGrab.sync.frozen)
|
||||
return;
|
||||
|
||||
flags |= TOUCH_CLIENT_ID;
|
||||
if (ti->emulate_pointer)
|
||||
flags |= TOUCH_POINTER_EMULATED;
|
||||
TouchDeliverDeviceClassesChangedEvent(ti, GetTimeInMillis(), resource);
|
||||
GetDixTouchEnd(&event, dev, ti, flags);
|
||||
DeliverTouchEvents(dev, ti, &event, resource);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user