winemac: Don't check the state of the SC_MINIMIZE item of the window menu when asked to minimize.

The window menu items are not updated as the window state changes; they only
update when the menu is shown.  So the item state is not a reliable indicator
of whether minimization is allowed.
This commit is contained in:
Ken Thomases 2013-12-29 21:33:07 -06:00 committed by Alexandre Julliard
parent aa4ebeb57c
commit 2c6ad1829d

View file

@ -2037,7 +2037,6 @@ void macdrv_app_deactivated(void)
void macdrv_window_minimize_requested(HWND hwnd)
{
DWORD style;
HMENU hSysMenu;
style = GetWindowLongW(hwnd, GWL_STYLE);
if (!(style & WS_MINIMIZEBOX) || (style & (WS_DISABLED | WS_MINIMIZE)))
@ -2046,17 +2045,6 @@ void macdrv_window_minimize_requested(HWND hwnd)
return;
}
hSysMenu = GetSystemMenu(hwnd, FALSE);
if (hSysMenu)
{
UINT state = GetMenuState(hSysMenu, SC_MINIMIZE, MF_BYCOMMAND);
if (state == 0xFFFFFFFF || (state & (MF_DISABLED | MF_GRAYED)))
{
TRACE("not minimizing win %p menu state 0x%08x\n", hwnd, state);
return;
}
}
if (GetActiveWindow() != hwnd)
{
LRESULT ma = SendMessageW(hwnd, WM_MOUSEACTIVATE, (WPARAM)GetAncestor(hwnd, GA_ROOT),