Commit 62a1907c authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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.
parent b15f412e
...@@ -1202,6 +1202,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) ...@@ -1202,6 +1202,8 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
- (void)windowDidDeminiaturize:(NSNotification *)notification - (void)windowDidDeminiaturize:(NSNotification *)notification
{ {
WineApplicationController* controller = [WineApplicationController sharedController];
if (!ignore_windowDeminiaturize) if (!ignore_windowDeminiaturize)
{ {
macdrv_event* event; macdrv_event* event;
...@@ -1218,7 +1220,15 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) ...@@ -1218,7 +1220,15 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers)
ignore_windowDeminiaturize = FALSE; 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 - (void) windowDidEndLiveResize:(NSNotification *)notification
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment