Added XSync call for hotkey without window

For #3
This commit is contained in:
Skycoder42
2017-05-14 13:32:06 +02:00
parent 7c4ef6a03a
commit 3fa176a380
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -106,6 +106,7 @@ bool QHotkeyPrivateX11::registerShortcut(QHotkey::NativeShortcut shortcut)
GrabModeAsync,
GrabModeAsync);
}
XSync(display, QueuedAlready);
if(errorHandler.hasError) {
qCWarning(logQHotkey) << "Failed to register hotkey. Error:"
@@ -129,6 +130,7 @@ bool QHotkeyPrivateX11::unregisterShortcut(QHotkey::NativeShortcut shortcut)
shortcut.modifier | specialMod,
DefaultRootWindow(display));
}
XSync(display, QueuedAlready);
if(errorHandler.hasError) {
qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"