summaryrefslogtreecommitdiff
path: root/src/events.c
diff options
context:
space:
mode:
authorShawn <sabetts@juicebox>2008-02-06 14:16:37 -0800
committerShawn <sabetts@juicebox>2008-02-06 14:16:37 -0800
commitbd51b1705292845686f8f682d15f6b7b90ddc787 (patch)
tree17419004fb598453f019bc57cc1d33063a0f1327 /src/events.c
parentcbcc8f2882ac8985a027b5c8423b5e764c51c158 (diff)
downloadratpoison-bd51b1705292845686f8f682d15f6b7b90ddc787.zip
Change the way input is read
Before rp used xgrabkeyboard to read a key. Instead, the keyboard is frozen when a top level key is read. Then when rp reads a key it first sets the input focus to a suitable location such as key_window or input_window, then thaws the keyboard and waits for a keypress. When a key is pressed the keyboard is frozen again and the process repeats until ratpoison is done reading input. At that point the keyboard is thawed in a way that future keystrokes do not refreeze the keyboard.
Diffstat (limited to 'src/events.c')
-rw-r--r--src/events.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/events.c b/src/events.c
index bdc288f..ec26ceb 100644
--- a/src/events.c
+++ b/src/events.c
@@ -427,6 +427,8 @@ handle_key (KeySym ks, unsigned int mod, rp_screen *s)
{
PRINT_DEBUG(("Impossible: No matching key"));
}
+
+ /* All keys have been read so now we let the keyboard go. */
XAllowEvents (dpy, AsyncKeyboard, CurrentTime);
}