diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-01 17:56:14 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-11-01 17:56:14 +0100 |
commit | cf0c8a7f3a28e577a0f6b94c7d92be02a3b70bbd (patch) | |
tree | af463af577e345daa48e240b272d119dc71d38d0 /plugins/hotkeys | |
parent | 2de3449ed2fa7dade90647a2456727813760e2cf (diff) |
added gui_locking abilities to plugin api
added some fixups to hotkeys plugin X11 interaction
Diffstat (limited to 'plugins/hotkeys')
-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; |