diff options
author | Russ Cox <rsc@swtch.com> | 2008-07-03 13:43:58 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-07-03 13:43:58 -0400 |
commit | 5a764c33f599e792674b5f4c01b4c0e51da262b7 (patch) | |
tree | f4cf87182bc6e49257d1eaa2d111db7cc73186b6 /src | |
parent | cdead40b9bb4b40469d3aa3c31ec30904113114f (diff) | |
download | plan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.tar.gz plan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.tar.bz2 plan9port-5a764c33f599e792674b5f4c01b4c0e51da262b7.zip |
devdraw: OS X: fix Unicode input errors (Andrey Mirtchovski)
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/devdraw/osx-screen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/devdraw/osx-screen.c b/src/cmd/devdraw/osx-screen.c index 5a7e9ea9..e8897c1d 100644 --- a/src/cmd/devdraw/osx-screen.c +++ b/src/cmd/devdraw/osx-screen.c @@ -426,9 +426,11 @@ kbdevent(EventRef event) keystroke(k); else{ UniChar ch; - GetEventParameter(event, kEventParamKeyUnicodes, + OSStatus s; + + s = GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText, nil, sizeof uc, nil, &uc); - if(uc >= 0) + if(s == noErr) keystroke(uc); } break; |