winemac: Only call -[NSApplication unhide:] if the app is actually hidden.
commit951a6c0338d39d5bb1a02d701bc6069f85ce82a4
authorKen Thomases <ken@codeweavers.com>
Wed, 20 Jul 2016 23:50:25 +0000 (20 18:50 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 21 Jul 2016 07:13:39 +0000 (21 16:13 +0900)
treefb75b99e1197a2c088ec0f628a4e4362d75781c1
parenta70c24d454af0404cd3ad90e29c1e60d1273abb0
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: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/winemac.drv/cocoa_window.m