From a2abaa9fd3a5ad713c1f946e9d7f598825ad3a84 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 31 Dec 2008 11:57:49 -0800 Subject: [PATCH] XQuartz: Make sure to reset the saved key state when deactivating X11.app (cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) --- hw/xquartz/X11Application.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);