From 76ba6daf64885ee9422846a85e61f502c68ed27f Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Fri, 5 May 2017 11:09:26 -0400 Subject: [PATCH] Fix windows-key global keybinding. (#172) This fixes #98 where setting the windows-key as the menu hotkey blocks all other windows-key-based shortcuts. --- usr/lib/linuxmint/mintMenu/keybinding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/linuxmint/mintMenu/keybinding.py b/usr/lib/linuxmint/mintMenu/keybinding.py index 3f23db9..f9e6b83 100644 --- a/usr/lib/linuxmint/mintMenu/keybinding.py +++ b/usr/lib/linuxmint/mintMenu/keybinding.py @@ -89,7 +89,7 @@ class GlobalKeyBinding(GObject.GObject, threading.Thread): catch = error.CatchError(error.BadAccess) for ignored_mask in self.ignored_masks: mod = modifiers | ignored_mask - result = self.window.grab_key(self.keycode, mod, True, X.GrabModeAsync, X.GrabModeSync, onerror=catch) + result = self.window.grab_key(self.keycode, mod, True, X.GrabModeAsync, X.GrabModeAsync, onerror=catch) self.display.flush() # sync has been blocking. Don't know why. #self.display.sync() @@ -146,7 +146,9 @@ class GlobalKeyBinding(GObject.GObject, threading.Thread): GLib.idle_add(self.idle) self.display.allow_events(X.AsyncKeyboard, event.time) else: + self.display.send_event(self.window, event, X.KeyPressMask | X.KeyReleaseMask, True) self.display.allow_events(X.ReplayKeyboard, event.time) + wait_for_release = False except AttributeError: continue