Mutter refuses to maximize a window when MWM_FUNC_MAXIMIZE is not present. However, ShowWindow(SW_MAXIMIZE) on Windows can maximize the window, even without WS_MAXIMIZEBOX. This is similar to 688fe706.
Fix Tidy Cauldron (2708320), a Unity game, unable to maximize in some cases.
From: Zhiyi Zhang zzhang@codeweavers.com
Mutter refuses to maximize a window when MWM_FUNC_MAXIMIZE is not present. However, ShowWindow(SW_MAXIMIZE) on Windows can maximize the window, even without WS_MAXIMIZEBOX. This is similar to 688fe706.
Fix Tidy Cauldron (2708320), a Unity game, unable to maximize in some cases. --- dlls/winex11.drv/window.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 52d0e32ad55..615fb9da086 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -913,6 +913,9 @@ static void set_mwm_hints( struct x11drv_win_data *data, UINT style, UINT ex_sty /* 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; + /* The window can be programmatically maximized even without + a maximize box button. Allow the WM to maximize it. */ + if (style & WS_MAXIMIZE) mwm_hints.functions |= MWM_FUNC_MAXIMIZE; } }
This merge request was approved by Rémi Bernon.
Fwiw decorations with Mutter are utterly broken. This is probably due to WM bugs but it simply breaks very quickly when decorations are changed. This is probably unrelated to this change which looks fine, just something worth noting.