summaryrefslogtreecommitdiff
path: root/plugins/hotkeys
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-01 17:56:14 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-11-01 17:56:14 +0100
commitcf0c8a7f3a28e577a0f6b94c7d92be02a3b70bbd (patch)
treeaf463af577e345daa48e240b272d119dc71d38d0 /plugins/hotkeys
parent2de3449ed2fa7dade90647a2456727813760e2cf (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.c5
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;