winemac.drv: Make sure that NSMiniaturizableWindowMask style mask is set before calling miniaturize.

miniaturize fails to minimize window when NSMiniaturizableWindowMask
style is not set. The style will be restored on window restore (or earlier).

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2019-11-06 15:19:23 +01:00 committed by Alexandre Julliard
parent b0199ea2fe
commit 7c29f5a3b3
1 changed files with 2 additions and 0 deletions

View File

@ -1289,6 +1289,7 @@ - (void) setMacDrvState:(const struct macdrv_window_state*)state
}
else
{
[self setStyleMask:([self styleMask] | NSMiniaturizableWindowMask)];
[super miniaturize:nil];
discard |= event_mask_for_type(WINDOW_BROUGHT_FORWARD) |
event_mask_for_type(WINDOW_GOT_FOCUS) |
@ -1763,6 +1764,7 @@ - (void) orderBelow:(WineWindow*)prev orAbove:(WineWindow*)next activate:(BOOL)a
if (pendingMinimize)
{
[self setStyleMask:([self styleMask] | NSMiniaturizableWindowMask)];
[super miniaturize:nil];
pendingMinimize = FALSE;
}