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.
This commit is contained in:
parent
89c5ea08ae
commit
76ba6daf64
@ -89,7 +89,7 @@ class GlobalKeyBinding(GObject.GObject, threading.Thread):
|
|||||||
catch = error.CatchError(error.BadAccess)
|
catch = error.CatchError(error.BadAccess)
|
||||||
for ignored_mask in self.ignored_masks:
|
for ignored_mask in self.ignored_masks:
|
||||||
mod = modifiers | ignored_mask
|
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()
|
self.display.flush()
|
||||||
# sync has been blocking. Don't know why.
|
# sync has been blocking. Don't know why.
|
||||||
#self.display.sync()
|
#self.display.sync()
|
||||||
@ -146,7 +146,9 @@ class GlobalKeyBinding(GObject.GObject, threading.Thread):
|
|||||||
GLib.idle_add(self.idle)
|
GLib.idle_add(self.idle)
|
||||||
self.display.allow_events(X.AsyncKeyboard, event.time)
|
self.display.allow_events(X.AsyncKeyboard, event.time)
|
||||||
else:
|
else:
|
||||||
|
self.display.send_event(self.window, event, X.KeyPressMask | X.KeyReleaseMask, True)
|
||||||
self.display.allow_events(X.ReplayKeyboard, event.time)
|
self.display.allow_events(X.ReplayKeyboard, event.time)
|
||||||
|
wait_for_release = False
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user