diff --git a/QHotkey/qhotkey_x11.cpp b/QHotkey/qhotkey_x11.cpp index f10e350..185aca3 100644 --- a/QHotkey/qhotkey_x11.cpp +++ b/QHotkey/qhotkey_x11.cpp @@ -106,7 +106,7 @@ bool QHotkeyPrivateX11::registerShortcut(QHotkey::NativeShortcut shortcut) GrabModeAsync, GrabModeAsync); } - XSync(display, QueuedAlready); + XSync(display, true); if(errorHandler.hasError) { qCWarning(logQHotkey) << "Failed to register hotkey. Error:" @@ -130,7 +130,7 @@ bool QHotkeyPrivateX11::unregisterShortcut(QHotkey::NativeShortcut shortcut) shortcut.modifier | specialMod, DefaultRootWindow(display)); } - XSync(display, QueuedAlready); + XSync(display, true); if(errorHandler.hasError) { qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"