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>
This commit is contained in:
parent
863f32c930
commit
b4e44b285e
|
@ -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…
Reference in New Issue
Block a user