Module: wine Branch: master Commit: 08e940fb1d87a6f756a305a79f6cddd6dfdc8b8b URL: http://source.winehq.org/git/wine.git/?a=commit;h=08e940fb1d87a6f756a305a79f...
Author: Ken Thomases ken@codeweavers.com Date: Wed May 8 10:46:02 2013 -0500
winemac: Unminimize a window on activation if there are only minimized windows.
---
dlls/winemac.drv/cocoa_app.m | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 4e7cecc..f9363c1 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -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