diff options
author | waker <wakeroid@gmail.com> | 2012-11-04 21:33:09 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-11-04 21:33:09 +0100 |
commit | 3821fd7dd32f99e2079cbffa95f0c18dccc41eda (patch) | |
tree | 62e6b73e74340221709b8e5ebfc0f4b26c3a8c47 /plugins/hotkeys | |
parent | e3306555abb5e41d10e49e08f711de4a558c24bb (diff) |
hotkeys: don't crash on x errors
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 dd9cffc1..055c7564 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -276,6 +276,7 @@ out: if (f & 8) { flags |= Mod5Mask; } + trace ("XGrabKey %d %x\n", commands[i].keycode, commands[i].modifier | flags); XGrabKey (disp, commands[i].keycode, commands[i].modifier | flags, DefaultRootWindow (disp), False, GrabModeAsync, GrabModeAsync); } } @@ -297,10 +298,12 @@ cleanup () { static int x_err_handler (Display *d, XErrorEvent *evt) { +#if 0 + // this code crashes if gtk plugin is active char buffer[1024]; XGetErrorText (d, evt->error_code, buffer, sizeof (buffer)); trace ("hotkeys: xlib error: %s\n", buffer); - +#endif return 0; } |