From: Tim Clem tclem@codeweavers.com
--- dlls/winemac.drv/cocoa_app.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index a86c58f4a30..dd9ae15ab15 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -328,7 +328,22 @@ - (void) doPendingDockIconChange } else if(NSApp.activationPolicy != NSApplicationActivationPolicyAccessory) { + BOOL wasActive = [NSApp isActive]; NSApp.activationPolicy = NSApplicationActivationPolicyAccessory; + + /* Hiding the dock icon deactivates the app. Reactivate if we + were active and we still have visible windows. */ + if (wasActive) + { + for (NSWindow *w in [NSApp windows]) + { + if (w.isVisible) + { + [self tryToActivateIgnoringOtherApps:YES]; + break; + } + } + } } }