From: Tim Clem tclem@codeweavers.com
Fixes doubled input with certain input sources. --- dlls/winemac.drv/cocoa_window.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 0d2862218ec..1cc87c27510 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -3992,7 +3992,10 @@ void macdrv_send_text_input_event(int pressed, unsigned int flags, int repeat, i window = [[WineApplicationController sharedController] frontWineWindow]; }
- if (window) + /* Only key down events should go to the window's inputContext. Key up + events bound for a window should be treated as handled without going + to the context. */ + if (window && pressed) { NSUInteger localFlags = flags; CGEventRef c; @@ -4013,6 +4016,8 @@ void macdrv_send_text_input_event(int pressed, unsigned int flags, int repeat, i window.commandDone = FALSE; ret = [[[window contentView] inputContext] handleEvent:event] && !window.commandDone; } + else if (window && !pressed) + ret = TRUE; else ret = FALSE;