diff options
| author | rsc <devnull@localhost> | 2004-12-26 23:24:32 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-12-26 23:24:32 +0000 |
| commit | b20f06ab9cc0058a7e5b5e434d412db19ea7e2b8 (patch) | |
| tree | f5aa664d8a216f9ce037936f04dcd59f4e5e2f91 /src/libdraw/x11-keyboard.c | |
| parent | d9f3e89e5efc95811a7d56aa8ae107aad3e3e286 (diff) | |
| download | plan9port-b20f06ab9cc0058a7e5b5e434d412db19ea7e2b8.tar.gz plan9port-b20f06ab9cc0058a7e5b5e434d412db19ea7e2b8.zip | |
use new thread library
Diffstat (limited to 'src/libdraw/x11-keyboard.c')
| -rw-r--r-- | src/libdraw/x11-keyboard.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libdraw/x11-keyboard.c b/src/libdraw/x11-keyboard.c index bee0f410..1a4d0a3b 100644 --- a/src/libdraw/x11-keyboard.c +++ b/src/libdraw/x11-keyboard.c @@ -45,9 +45,7 @@ _ioproc(void *arg) fd = XConnectionNumber(_x.kbdcon); XSelectInput(_x.kbdcon, _x.drawable, KeyPressMask); for(;;){ - while(XCheckWindowEvent(_x.kbdcon, _x.drawable, KeyPressMask, &xevent) == False){ - threadfdwait(fd, 'r'); - } + XWindowEvent(_x.kbdcon, _x.drawable, KeyPressMask, &xevent); switch(xevent.type){ case KeyPress: i = _xtoplan9kbd(&xevent); @@ -69,12 +67,12 @@ initkeyboard(char *file) { Keyboardctl *kc; - threadfdwaitsetup(); kc = mallocz(sizeof(Keyboardctl), 1); if(kc == nil) return nil; kc->c = chancreate(sizeof(Rune), 20); - threadcreate(_ioproc, kc, 32768); + chansetname(kc->c, "kbdc"); + proccreate(_ioproc, kc, 32768); return kc; } |
