diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2012-10-31 19:29:45 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-11-06 10:48:32 +1000 |
commit | b4e44b285ed0eee1d06514215a4b01d54f40094b (patch) | |
tree | 13817b48d42149c9860ed7b21ee3dd77b8b6d3a1 /Xi | |
parent | 863f32c930d71073ee5f78452b78bd459d024867 (diff) |
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>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 5cf873c6e..106da3a1b 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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. */ |