winex11.drv: Always add MWM_FUNC_CLOSE to enabled windows.
commit211da181c9140541ab7f7fcfa479367b3f7783eb
authorZhiyi Zhang <zzhang@codeweavers.com>
Mon, 31 May 2021 08:05:03 +0000 (31 16:05 +0800)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 31 May 2021 19:06:25 +0000 (31 21:06 +0200)
treef845f71b939a81e2b2a3b641c9bfdefb94cefbc0
parente6961f6e16b35729301967b04078158cd66eaab2
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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/winex11.drv/window.c