Ken Thomases : winemac: Make windows key after unminimizing, if allowed.
Module: wine Branch: master Commit: 62a1907c9e9f66c331370c654bb600f175a0cba1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=62a1907c9e9f66c331370c654b... Author: Ken Thomases <ken(a)codeweavers.com> Date: Tue Jun 4 04:59:51 2013 -0500 winemac: Make windows key after unminimizing, if allowed. We generally prevent Cocoa from making our windows key (focused) so that Wine can be in control. However, after unminimizing, Wine believes the window is already focused but Cocoa doesn't, so key presses just cause beeps. --- dlls/winemac.drv/cocoa_window.m | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 035576e..6fbd0db 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -1202,6 +1202,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) - (void)windowDidDeminiaturize:(NSNotification *)notification { + WineApplicationController* controller = [WineApplicationController sharedController]; + if (!ignore_windowDeminiaturize) { macdrv_event* event; @@ -1218,7 +1220,15 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) ignore_windowDeminiaturize = FALSE; - [[WineApplicationController sharedController] adjustWindowLevels]; + [controller adjustWindowLevels]; + + if (!self.disabled && !self.noActivate) + { + causing_becomeKeyWindow = TRUE; + [self makeKeyWindow]; + causing_becomeKeyWindow = FALSE; + [controller windowGotFocus:self]; + } } - (void) windowDidEndLiveResize:(NSNotification *)notification
participants (1)
-
Alexandre Julliard