evdev: add master / slave device handling

All evdev devices are slave devices, which means that xkb state
and pointer position must be shared by emulating a core keyboard
and a core pointer. Also, we must make sure to add all modifier
state (keyboard and button) to our events.

https://bugzilla.gnome.org/show_bug.cgi?id=705710
This commit is contained in:
Giovanni Campagna
2013-08-09 11:53:46 +02:00
parent f749858df3
commit 786532213b
4 changed files with 139 additions and 105 deletions

View File

@ -256,8 +256,9 @@ clutter_wayland_repeat_key (void *data)
ClutterEvent *event;
event = _clutter_key_event_new_from_evdev ((ClutterInputDevice *) device,
(ClutterInputDevice*) device,
stage_cogl->wrapper,
device->xkb,
device->xkb, 0,
device->repeat_time,
device->repeat_key,
1);
@ -292,8 +293,9 @@ clutter_wayland_handle_key (void *data,
return;
event = _clutter_key_event_new_from_evdev ((ClutterInputDevice *) device,
(ClutterInputDevice *) device,
stage_cogl->wrapper,
device->xkb,
device->xkb, 0,
_clutter_wayland_get_time(),
key, state);