mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/enum: Add CLUTTER_EVENT_FLAG_REPEATED for auto-repeated events
This commit is contained in:
parent
db604dda89
commit
0f40541bb2
@ -761,6 +761,7 @@ typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
* ClutterEventFlags:
|
||||
* @CLUTTER_EVENT_NONE: No flag set
|
||||
* @CLUTTER_EVENT_FLAG_SYNTHETIC: Synthetic event
|
||||
* @CLUTTER_EVENT_FLAG_REPEATED: Auto-repeated event
|
||||
*
|
||||
* Flags for the #ClutterEvent
|
||||
*
|
||||
@ -769,7 +770,8 @@ typedef enum { /*< prefix=CLUTTER_DRAG >*/
|
||||
typedef enum { /*< flags prefix=CLUTTER_EVENT >*/
|
||||
CLUTTER_EVENT_NONE = 0,
|
||||
CLUTTER_EVENT_FLAG_SYNTHETIC = 1 << 0,
|
||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1
|
||||
CLUTTER_EVENT_FLAG_INPUT_METHOD = 1 << 1,
|
||||
CLUTTER_EVENT_FLAG_REPEATED = 1 << 2
|
||||
} ClutterEventFlags;
|
||||
|
||||
/**
|
||||
|
@ -313,8 +313,7 @@ start_slow_keys (ClutterEvent *event,
|
||||
SlowKeysEventPending *slow_keys_event;
|
||||
ClutterKeyEvent *key_event = (ClutterKeyEvent *) event;
|
||||
|
||||
/* Synthetic key events are for autorepeat, ignore those... */
|
||||
if (key_event->flags & CLUTTER_EVENT_FLAG_SYNTHETIC)
|
||||
if (key_event->flags & CLUTTER_EVENT_FLAG_REPEATED)
|
||||
return;
|
||||
|
||||
slow_keys_event = g_new0 (SlowKeysEventPending, 1);
|
||||
|
@ -310,7 +310,7 @@ clutter_seat_evdev_notify_key (ClutterSeatEvdev *seat,
|
||||
else
|
||||
{
|
||||
changed_state = 0;
|
||||
clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_SYNTHETIC);
|
||||
clutter_event_set_flags (event, CLUTTER_EVENT_FLAG_REPEATED);
|
||||
}
|
||||
|
||||
queue_event (event);
|
||||
|
@ -647,10 +647,9 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
#endif
|
||||
|
||||
/* Synthetic key events are for autorepeat. Ignore those, as
|
||||
* autorepeat in Wayland is done on the client side. */
|
||||
if ((event->key.flags & CLUTTER_EVENT_FLAG_SYNTHETIC) &&
|
||||
!(event->key.flags & CLUTTER_EVENT_FLAG_INPUT_METHOD))
|
||||
/* Ignore autorepeat events, as autorepeat in Wayland is done on the client
|
||||
* side. */
|
||||
if (event->key.flags & CLUTTER_EVENT_FLAG_REPEATED)
|
||||
return FALSE;
|
||||
|
||||
#ifdef HAVE_NATIVE_BACKEND
|
||||
|
Loading…
Reference in New Issue
Block a user