diff options
Diffstat (limited to 'xmouseless.c')
-rw-r--r-- | xmouseless.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmouseless.c b/xmouseless.c index 65f3e13..c3016bc 100644 --- a/xmouseless.c +++ b/xmouseless.c @@ -92,12 +92,6 @@ void handle_keypress(XKeyEvent event) { keysym = XkbKeycodeToKeysym(dpy, event.keycode, 0, event.state & ShiftMask ? 1 : 0); - /* exit */ - if (keysym == EXIT_KEY) { - close_x(); - exit(0); - } - /* move bindings */ for (i = 0; i < LENGTH(move_bindings); i++) { if (move_bindings[i].keysym == keysym) { @@ -154,6 +148,14 @@ void handle_keyrelease(XKeyEvent event) { speed = DEFAULT_SPEED; } } + + /* exit */ + for (i = 0; i < LENGTH(exit_keys); i++) { + if (exit_keys[i] == keysym) { + close_x(); + exit(0); + } + } } int main () { |