winemac: Unminimize a window on activation if there are only minimized windows.
This commit is contained in:
parent
6f1c143ad5
commit
08e940fb1d
|
@ -1613,6 +1613,10 @@ - (BOOL) inputSourceIsInputMethod
|
|||
*/
|
||||
- (void)applicationDidBecomeActive:(NSNotification *)notification
|
||||
{
|
||||
WineWindow* window;
|
||||
WineWindow* firstMinimized;
|
||||
BOOL anyShowing;
|
||||
|
||||
[self activateCursorClipping];
|
||||
|
||||
[orderedWineWindows enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(id obj, NSUInteger idx, BOOL *stop){
|
||||
|
@ -1621,6 +1625,24 @@ - (void)applicationDidBecomeActive:(NSNotification *)notification
|
|||
[window setLevel:[window levelWhenActive]];
|
||||
}];
|
||||
|
||||
firstMinimized = nil;
|
||||
anyShowing = FALSE;
|
||||
for (window in orderedWineWindows)
|
||||
{
|
||||
if ([window isMiniaturized])
|
||||
{
|
||||
if (!firstMinimized)
|
||||
firstMinimized = window;
|
||||
}
|
||||
else if ([window isVisible])
|
||||
{
|
||||
anyShowing = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!anyShowing && firstMinimized)
|
||||
[firstMinimized deminiaturize:self];
|
||||
|
||||
// If a Wine process terminates abruptly while it has the display captured
|
||||
// and switched to a different resolution, Mac OS X will uncapture the
|
||||
// displays and switch their resolutions back. However, the other Wine
|
||||
|
|
Loading…
Reference in New Issue