diff options
Diffstat (limited to 'plugins/hotkeys/hotkeys.c')
-rw-r--r-- | plugins/hotkeys/hotkeys.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index e890d1ac..d00d01b7 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -275,12 +275,15 @@ x_err_handler (Display *d, XErrorEvent *evt) { static void hotkeys_event_loop( uintptr_t unused ) { int i; - XSetErrorHandler( x_err_handler ); + deadbeef->gui_lock (); for ( i = 0; i < command_count; i++ ) { + XSetErrorHandler( x_err_handler ); XGrabKey( disp, commands[ i ].keycode, commands[ i ].modifier, DefaultRootWindow( disp ), False, GrabModeAsync, GrabModeAsync ); } + XSetErrorHandler( x_err_handler ); XSync (disp, 0); + deadbeef->gui_unlock (); while (!finished) { XEvent event; |