diff options
author | Andrea Azzarone <azzaronea@gmail.com> | 2018-07-18 18:40:39 +0200 |
---|---|---|
committer | Jonas Ã…dahl <jadahl@gmail.com> | 2018-08-20 10:16:33 +0000 |
commit | e1513b6b0094a3468e8a0dad7a0bace70dfeb79a (patch) | |
tree | b988f4a101f2adbbe9dccd4927ae7d8f6f1202a3 /clutter | |
parent | 0cc3cd62bafe06a2c6e0b854b7597a9921a414cc (diff) | |
download | mutter-e1513b6b0094a3468e8a0dad7a0bace70dfeb79a.tar.gz |
clutter/x11: Detect auto-repeated key events
Detect auto-repeated key events using the XIKeyRepeat flag.
Diffstat (limited to 'clutter')
-rw-r--r-- | clutter/clutter/x11/clutter-device-manager-xi2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clutter/clutter/x11/clutter-device-manager-xi2.c b/clutter/clutter/x11/clutter-device-manager-xi2.c index 62f558380..141f424b5 100644 --- a/clutter/clutter/x11/clutter-device-manager-xi2.c +++ b/clutter/clutter/x11/clutter-device-manager-xi2.c @@ -1271,6 +1271,9 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator, ? CLUTTER_KEY_PRESS : CLUTTER_KEY_RELEASE; + if (xev->evtype == XI_KeyPress && xev->flags & XIKeyRepeat) + clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_REPEATED); + event->key.time = xev->time; event->key.stage = stage; _clutter_input_device_xi2_translate_state (event, &xev->mods, &xev->buttons, &xev->group); |