diff options
author | Shawn <sabetts@juicebox> | 2008-02-06 14:16:37 -0800 |
---|---|---|
committer | Shawn <sabetts@juicebox> | 2008-02-06 14:16:37 -0800 |
commit | bd51b1705292845686f8f682d15f6b7b90ddc787 (patch) | |
tree | 17419004fb598453f019bc57cc1d33063a0f1327 /src/events.c | |
parent | cbcc8f2882ac8985a027b5c8423b5e764c51c158 (diff) | |
download | ratpoison-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.c | 2 |
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); } |