From bcde44fb8a34a9fc9bab60a8ff90700f07b0d6c4 Mon Sep 17 00:00:00 2001
From: Ken Thomases <ken@codeweavers.com>
Date: Tue, 31 Dec 2013 01:05:13 -0600
Subject: [PATCH] winemac: Explicitly unhide the app early when showing
 windows.

Cocoa would implictly unhide it when we order a window, anyway.  Doing it
early avoids problems from querying -[NSWindow isVisible] while the app is
hidden.  That method returns FALSE even for windows which would be visible
if the app weren't hidden.
---
 dlls/winemac.drv/cocoa_window.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m
index a025d598d90..07abbcaab3d 100644
--- a/dlls/winemac.drv/cocoa_window.m
+++ b/dlls/winemac.drv/cocoa_window.m
@@ -1118,9 +1118,11 @@ - (void) orderBelow:(WineWindow*)prev orAbove:(WineWindow*)next activate:(BOOL)a
         if (![self isMiniaturized])
         {
             BOOL needAdjustWindowLevels = FALSE;
-            BOOL wasVisible = [self isVisible];
+            BOOL wasVisible;
 
             [controller transformProcessToForeground];
+            [NSApp unhide:nil];
+            wasVisible = [self isVisible];
 
             if (activate)
                 [NSApp activateIgnoringOtherApps:YES];
-- 
GitLab