Zhiyi Zhang : winex11.drv: Always add MWM_FUNC_CLOSE to enabled windows.
Module: wine Branch: master Commit: 211da181c9140541ab7f7fcfa479367b3f7783eb URL: https://source.winehq.org/git/wine.git/?a=commit;h=211da181c9140541ab7f7fcfa... Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon May 31 16:05:03 2021 +0800 winex11.drv: Always add MWM_FUNC_CLOSE to enabled windows. Some window managers require MWM_FUNC_CLOSE to be present for a window to be allowed to close. For example, on KWin, a window of style WS_POPUP | WS_VISIBLE has a close button drawn on top of its taskbar preview. But when you press it, the window manager refuses to close it. On Mutter, windows without MWN_FUNC_CLOSE doesn't have a close button on the window preview. On Windows 10, enabled windows without WS_SYSMENU always has a close button on their taskbar window preview and can always be closed with the close button. On Windows 7, enabled windows without WS_SYSMENU has no close button on the window preview but still can be closed with the right-click menu on the taskbar. This patch changes the behavior to match that of Windows 10. Fix WeChat image preview window cannot be closed from KDE panels. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 386f21c85d4..4e856a41865 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -749,9 +749,9 @@ static void set_mwm_hints( struct x11drv_win_data *data, DWORD style, DWORD ex_s if (is_window_resizable( data, style )) mwm_hints.functions |= MWM_FUNC_RESIZE; if (!(style & WS_DISABLED)) { + mwm_hints.functions |= MWM_FUNC_CLOSE; 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. */
participants (1)
-
Alexandre Julliard