winex11.drv: Always enable minimize/maximize functions for minimized windows.
A window without a minimize or maximize box can still be programmatically minimized by the Windows API. However, some WMs will refuse to change the state and not allow it to be maximized again, despite it being minimized, due to lacking those functions, thus not sending WM_STATE change notifications when clicking the minimized window on the taskbar. Heroes of Might and Magic V does this, for example, when losing focus. It minimizes itself. When maximizing it by clicking on the taskbar it won't send a WM_STATE change notification (since it was never changed) and fail to maximize properly, showing a black screen (the game will still think it is minimized). Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
79776e4540
commit
688fe7068c
|
@ -752,6 +752,10 @@ static void set_mwm_hints( struct x11drv_win_data *data, DWORD style, DWORD ex_s
|
|||
if (style & WS_MINIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MINIMIZE;
|
||||
if (style & WS_MAXIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MAXIMIZE;
|
||||
if (style & WS_SYSMENU) mwm_hints.functions |= MWM_FUNC_CLOSE;
|
||||
|
||||
/* The window can be programmatically minimized even without
|
||||
a minimize box button. Allow the WM to restore it. */
|
||||
if (style & WS_MINIMIZE) mwm_hints.functions |= MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue