[hackers] [svkbd] Unpress modifiers so there is no problem when exiting svkbd inbetween. || Christoph Lohmann

From: <hg_AT_suckless.org>
Date: Sat, 27 Oct 2012 00:04:25 +0200 (CEST)

changeset: 57:e9301fef1b63
tag: tip
user: Christoph Lohmann <20h_AT_r-36.net>
date: Sat Oct 27 00:01:15 2012 +0200
files: svkbd.c
description:
Unpress modifiers so there is no problem when exiting svkbd inbetween.


diff -r 15fb11d6a0f2 -r e9301fef1b63 svkbd.c
--- a/svkbd.c Fri Oct 26 23:53:29 2012 +0200
+++ b/svkbd.c Sat Oct 27 00:01:15 2012 +0200
_AT_@ -371,6 +371,14 @@
                                         True, 0);
                 }
                 XTestFakeKeyEvent(dpy, XKeysymToKeycode(dpy, k->keysym), True, 0);
+
+ for(i = 0; i < LENGTH(keys); i++) {
+ if(keys[i].pressed && IsModifierKey(keys[i].keysym)) {
+ XTestFakeKeyEvent(dpy,
+ XKeysymToKeycode(dpy, keys[i].keysym),
+ False, 0);
+ }
+ }
         }
         drawkey(k);
 }
Received on Sat Oct 27 2012 - 00:04:25 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 27 2012 - 00:12:23 CEST