diff options
author | marha <marha@users.sourceforge.net> | 2012-02-01 08:27:16 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-02-01 08:27:16 +0100 |
commit | 58ff764d4111bfaa7360c57bc62dd620fbdce06f (patch) | |
tree | adc5c52beb88c10ecb1df7b33983e901afc7dea0 /xorg-server/hw/xquartz/X11Application.m | |
parent | c7a181e449c6a2ea5f0ad0514865e7c559dbe6dc (diff) | |
download | vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.tar.gz vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.tar.bz2 vcxsrv-58ff764d4111bfaa7360c57bc62dd620fbdce06f.zip |
xserver mesa pixman xkbcomp xkeyboard-config git update 1 feb 2012
Diffstat (limited to 'xorg-server/hw/xquartz/X11Application.m')
-rw-r--r-- | xorg-server/hw/xquartz/X11Application.m | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/xorg-server/hw/xquartz/X11Application.m b/xorg-server/hw/xquartz/X11Application.m index 12ff53c88..5b38eae32 100644 --- a/xorg-server/hw/xquartz/X11Application.m +++ b/xorg-server/hw/xquartz/X11Application.m @@ -68,9 +68,6 @@ extern int xpbproxy_run (void); static dispatch_queue_t eventTranslationQueue; #endif -/* Stuck modifier / button state... force release when we context switch */ -static NSEventType keyState[NUM_KEYCODES]; - extern Bool noTestExtensions; #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 @@ -194,7 +191,6 @@ static void message_kit_thread (SEL selector, NSObject *arg) { } - (void) activateX:(OSX_BOOL)state { - size_t i; DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active); if (state) { if(bgMouseLocationUpdated) { @@ -206,13 +202,13 @@ static void message_kit_thread (SEL selector, NSObject *arg) { if(darwin_all_modifier_flags) DarwinUpdateModKeys(0); - for(i=0; i < NUM_KEYCODES; i++) { - if(keyState[i] == NSKeyDown) { - DarwinSendKeyboardEvents(KeyRelease, i); - keyState[i] = NSKeyUp; - } - } - + + DarwinInputReleaseButtonsAndKeys(darwinKeyboard); + DarwinInputReleaseButtonsAndKeys(darwinPointer); + DarwinInputReleaseButtonsAndKeys(darwinTabletCursor); + DarwinInputReleaseButtonsAndKeys(darwinTabletStylus); + DarwinInputReleaseButtonsAndKeys(darwinTabletEraser); + DarwinSendDDXEvent(kXquartzDeactivate, 0); } @@ -1407,12 +1403,8 @@ static const char *untrusted_str(NSEvent *e) { } } - /* Avoid stuck keys on context switch */ - if(keyState[[e keyCode]] == [e type]) - return; - keyState[[e keyCode]] = [e type]; - - DarwinSendKeyboardEvents(([e type] == NSKeyDown) ? KeyPress : KeyRelease, [e keyCode]); + ev_type = ([e type] == NSKeyDown) ? KeyPress : KeyRelease; + DarwinSendKeyboardEvents(ev_type, [e keyCode]); break; default: break; /* for gcc */ |