mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
backend-x11: Fallback to a default keymap if getting it from X fails
This shouldn't fail but apparently sometimes it does and in that case having a possibly wrong idea of the keymap is still better than crashing. https://bugzilla.gnome.org/show_bug.cgi?id=754979
This commit is contained in:
parent
a9df4bb81a
commit
9abc071283
@ -760,6 +760,9 @@ meta_backend_x11_get_keymap (MetaBackend *backend)
|
||||
priv->xcb,
|
||||
xkb_x11_get_core_keyboard_device_id (priv->xcb),
|
||||
XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
if (priv->keymap == NULL)
|
||||
priv->keymap = xkb_keymap_new_from_names (context, NULL, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
|
||||
xkb_context_unref (context);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user