summaryrefslogtreecommitdiffstats
path: root/src/libdraw/x11-keyboard.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-26 23:24:32 +0000
committerrsc <devnull@localhost>2004-12-26 23:24:32 +0000
commitb20f06ab9cc0058a7e5b5e434d412db19ea7e2b8 (patch)
treef5aa664d8a216f9ce037936f04dcd59f4e5e2f91 /src/libdraw/x11-keyboard.c
parentd9f3e89e5efc95811a7d56aa8ae107aad3e3e286 (diff)
downloadplan9port-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.c8
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;
}