Commit 08e940fb authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Unminimize a window on activation if there are only minimized windows.

parent 6f1c143a
......@@ -1613,6 +1613,10 @@ int macdrv_err_on;
*/
- (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 @@ int macdrv_err_on;
[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
......
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