diff --git a/QHotkey/qhotkey_x11.cpp b/QHotkey/qhotkey_x11.cpp index 10ddf4e..9c1c209 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, False); + XFlush(display); 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, False); + XFlush(display); if(errorHandler.hasError) { qCWarning(logQHotkey) << "Failed to unregister hotkey. Error:"