mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 20:01:00 -05:00
wayland: Relax requirements for evdev events to have a evcode
There may be emulated events that don't contain those, it's fine to go through the fallback paths for these.
This commit is contained in:
parent
0dccf69cb3
commit
be0e1a65e5
@ -633,7 +633,7 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
|
|||||||
{
|
{
|
||||||
MetaWaylandKeyboard *keyboard = grab->keyboard;
|
MetaWaylandKeyboard *keyboard = grab->keyboard;
|
||||||
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
|
gboolean is_press = event->type == CLUTTER_KEY_PRESS;
|
||||||
guint32 code;
|
guint32 code = 0;
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
#endif
|
#endif
|
||||||
@ -647,7 +647,7 @@ default_grab_key (MetaWaylandKeyboardGrab *grab,
|
|||||||
#ifdef HAVE_NATIVE_BACKEND
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
if (META_IS_BACKEND_NATIVE (backend))
|
if (META_IS_BACKEND_NATIVE (backend))
|
||||||
code = clutter_evdev_event_get_event_code (event);
|
code = clutter_evdev_event_get_event_code (event);
|
||||||
else
|
if (code == 0)
|
||||||
#endif
|
#endif
|
||||||
code = evdev_code (&event->key);
|
code = evdev_code (&event->key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user