diff options
author | Povilas Kanapickas <povilas@radix.lt> | 2021-05-30 13:26:40 +0300 |
---|---|---|
committer | Povilas Kanapickas <povilas@radix.lt> | 2021-05-30 13:26:40 +0300 |
commit | 100a2ad6da4ba90f8d489c7a2ed3f3f0ac879a6f (patch) | |
tree | b71012f6c44766bd8a6acdd58eefe007df55de73 /dix/inpututils.c | |
parent | 7656a9c8dddbc57adfd4fd05f8e26b1845ac8738 (diff) |
dix: Implement gesture event submission code path
Diffstat (limited to 'dix/inpututils.c')
-rw-r--r-- | dix/inpututils.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c index b60ffff0d..6906f997b 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -746,6 +746,21 @@ init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms, event->source_type = source_type; } +/** + * Initializes the given gesture event to zero (or default values), + * for the given device. + */ +void +init_gesture_event(GestureEvent *event, DeviceIntPtr dev, Time ms) +{ + memset(event, 0, sizeof(GestureEvent)); + event->header = ET_Internal; + event->length = sizeof(GestureEvent); + event->time = ms; + event->deviceid = dev->id; + event->sourceid = dev->id; +} + int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd) { |