Commit 951a6c03 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Only call -[NSApplication unhide:] if the app is actually hidden.

This avoids a Cocoa bug where, if an app in the background which is not hidden calls -unhide:, its main menu bar window is brought forward. The active app hasn't actually been changed. Key events continue to go to the app in the foreground. But it's confusing to the user when they look at the menu bar and, if they click in the menu bar, the background app really will be activated. Signed-off-by: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a70c24d4
......@@ -1427,7 +1427,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
BOOL wasVisible;
[controller transformProcessToForeground];
[NSApp unhide:nil];
if ([NSApp isHidden])
[NSApp unhide:nil];
wasVisible = [self isVisible];
if (activate)
......
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