summaryrefslogtreecommitdiff
path: root/xbindkeys.c
diff options
context:
space:
mode:
authorDmitry Klimov <lazyklimm@gmail.com>2012-05-12 21:52:03 +0200
committerDmitry Klimov <lazyklimm@gmail.com>2012-05-12 21:52:03 +0200
commit22d313f262bc9b991f36a93a147300dd43217bb7 (patch)
tree7e8a494f84716f5767cb4b9d1df68ab8ce4abf2b /xbindkeys.c
parente0429db04c7a0867d0befdfd2ce5bc4e6804f5f7 (diff)
downloadxbindkeys-22d313f262bc9b991f36a93a147300dd43217bb7.tar.gz
Make release modifier works as expected when autorepeat is enabled
Diffstat (limited to 'xbindkeys.c')
-rw-r--r--xbindkeys.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xbindkeys.c b/xbindkeys.c
index f782c34..b0adef9 100644
--- a/xbindkeys.c
+++ b/xbindkeys.c
@@ -36,6 +36,7 @@
#include <libguile.h>
#endif
+#include <X11/XKBlib.h>
void end_it_all (Display * d);
@@ -91,6 +92,17 @@ inner_main (int argc, char **argv)
d = start (display_name);
current_display = d;
+ if (detectable_ar)
+ {
+ Bool supported_rtrn;
+ XkbSetDetectableAutoRepeat(d, True, &supported_rtrn);
+
+ if (!supported_rtrn)
+ {
+ fprintf (stderr, "Could not set detectable autorepeat\n");
+ }
+ }
+
get_offending_modifiers (d);
if (have_to_get_binding)
@@ -376,6 +388,11 @@ event_loop (Display * d)
if (e.xbutton.button == keys[i].key.button
&& e.xbutton.state == keys[i].modifier)
{
+ //printf("Replay!!!\n");
+ //ungrab_all_keys(d);
+ //XPutBackEvent(d, &e);
+ //sleep(1);
+ //grab_keys(d);
print_key (d, &keys[i]);
adjust_display(&e.xany);
start_command_key (&keys[i]);