summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-12-31 11:57:49 -0800
committerKeith Packard <keithp@keithp.com>2009-01-09 11:02:59 -0800
commite08ce79152b0887b8d67c4b03b33634f5ef499bc (patch)
tree89f01daebe37592adccfe33ddf6615b88f9c6847
parentbdf776b4579921dd49316c2ff32ff12cc702720a (diff)
XQuartz: Make sure to reset the saved key state when deactivating X11.app
(cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) (cherry picked from commit 0d2621b6d4684ec62e67156a5a9dbdd3297f9cb0)
-rw-r--r--hw/xquartz/X11Application.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index cbf5cbab0..cd5ab5c2b 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -202,8 +202,10 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
DarwinUpdateModKeys(0);
for(i=0; i < NUM_KEYCODES; i++) {
- if(keyState[i] == NSKeyDown)
+ if(keyState[i] == NSKeyDown) {
DarwinSendKeyboardEvents(KeyRelease, i);
+ keyState[i] = NSKeyUp;
+ }
}
DarwinSendDDXEvent(kXquartzDeactivate, 0);