From 6ba0491adf6ed2000e738b6e176f81d44b334518 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 10 Sep 2014 18:30:14 +0200 Subject: [PATCH] keybindings: Freeze and ungrab the keyboard only on X11 backend This isn't needed in the native backend because we control all the input event flow there. https://bugzilla.gnome.org/show_bug.cgi?id=736433 --- src/core/keybindings.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/keybindings.c b/src/core/keybindings.c index 1dc80fc17..15664606a 100644 --- a/src/core/keybindings.c +++ b/src/core/keybindings.c @@ -1629,12 +1629,22 @@ meta_window_ungrab_all_keys (MetaWindow *window, guint32 timestamp) void meta_display_freeze_keyboard (MetaDisplay *display, Window window, guint32 timestamp) { + MetaBackend *backend = meta_get_backend (); + + if (!META_IS_BACKEND_X11 (backend)) + return; + grab_keyboard (window, timestamp, XIGrabModeSync); } void meta_display_ungrab_keyboard (MetaDisplay *display, guint32 timestamp) { + MetaBackend *backend = meta_get_backend (); + + if (!META_IS_BACKEND_X11 (backend)) + return; + ungrab_keyboard (timestamp); }