mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
evdev: update the state of the core pointer and core keyboard for all events
These two devices are logically tied togheter, and their state should always be the same. Also, we need to update them after the event is queued, as the current modifier state (as opposed to the modifier mask in the event) should include also the effect of the last key press/release. https://bugzilla.gnome.org/show_bug.cgi?id=706494
This commit is contained in:
parent
0db9075562
commit
dd940a71b1
@ -544,9 +544,21 @@ clutter_event_dispatch (GSource *g_source,
|
||||
|
||||
if (event)
|
||||
{
|
||||
ClutterModifierType event_state;
|
||||
ClutterInputDevice *input_device;
|
||||
ClutterDeviceManagerEvdev *manager_evdev;
|
||||
|
||||
input_device = CLUTTER_INPUT_DEVICE (source->device);
|
||||
manager_evdev = CLUTTER_DEVICE_MANAGER_EVDEV (input_device->device_manager);
|
||||
|
||||
/* forward the event into clutter for emission etc. */
|
||||
clutter_do_event (event);
|
||||
clutter_event_free (event);
|
||||
|
||||
/* update the device states *after* the event */
|
||||
event_state = xkb_state_serialize_mods (manager_evdev->priv->xkb, XKB_STATE_MODS_EFFECTIVE);
|
||||
_clutter_input_device_set_state (manager_evdev->priv->core_pointer, event_state);
|
||||
_clutter_input_device_set_state (manager_evdev->priv->core_keyboard, event_state);
|
||||
}
|
||||
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user