diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-31 11:57:49 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-31 12:45:08 -0800 |
commit | 0d2621b6d4684ec62e67156a5a9dbdd3297f9cb0 (patch) | |
tree | 8655057446e3cd047c138a0b6aca6e6b734ef61c | |
parent | 9faf3de7e5610af340b92acb1b86bf03b6f2241a (diff) |
XQuartz: Make sure to reset the saved key state when deactivating X11.app
(cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0)
-rw-r--r-- | hw/xquartz/X11Application.m | 4 |
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) { | |||
202 | 202 | ||
203 | DarwinUpdateModKeys(0); | 203 | DarwinUpdateModKeys(0); |
204 | for(i=0; i < NUM_KEYCODES; i++) { | 204 | for(i=0; i < NUM_KEYCODES; i++) { |
205 | if(keyState[i] == NSKeyDown) | 205 | if(keyState[i] == NSKeyDown) { |
206 | DarwinSendKeyboardEvents(KeyRelease, i); | 206 | DarwinSendKeyboardEvents(KeyRelease, i); |
207 | keyState[i] = NSKeyUp; | ||
208 | } | ||
207 | } | 209 | } |
208 | 210 | ||
209 | DarwinSendDDXEvent(kXquartzDeactivate, 0); | 211 | DarwinSendDDXEvent(kXquartzDeactivate, 0); |