mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 16:30:05 +01:00
Xi: Set modifier mask on touch events
Button mask should be out-of-band with the emulated
pointer events as touch devices don't truly have
"buttons". Even though, it's handy to have the modifier
mask from the paired keyboard on touch events.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b4e44b285e)
This commit is contained in:
parent
2f99b38747
commit
1a4ec493bf
1 changed files with 5 additions and 0 deletions
|
|
@ -1559,6 +1559,7 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
uint32_t touchid;
|
||||
int type = ev->any.type;
|
||||
int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED);
|
||||
DeviceIntPtr kbd;
|
||||
|
||||
if (!t)
|
||||
return;
|
||||
|
|
@ -1618,6 +1619,10 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev)
|
|||
if (emulate_pointer && IsMaster(dev))
|
||||
CheckMotion(&ev->device_event, dev);
|
||||
|
||||
kbd = GetMaster(dev, KEYBOARD_OR_FLOAT);
|
||||
event_set_state(NULL, kbd, &ev->device_event);
|
||||
ev->device_event.corestate = event_get_corestate(NULL, kbd);
|
||||
|
||||
/* Make sure we have a valid window trace for event delivery; must be
|
||||
* called after event type mutation. Touch end events are always processed
|
||||
* in order to end touch records. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue