Module: wine
Branch: master
Commit: 57b1b21a84b15f121eef998a31151d760beb8c1c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=57b1b21a84b15f121eef998a…
Author: Ziqing Hui <zhui(a)codeweavers.com>
Date: Fri Apr 23 11:31:50 2021 +0800
winex11.drv: Correct a full screen condition.
The if condition here came from 47c54c4ae7f235780a55ddf670503db4afc11055,
which is to detect full screen window.
However, according to tests in previous commit, there is possibility
that a window without setting WS_CAPTION is not full screen, for example,
main window of Tencent WeChat. And windows like this can also be maximized
or restored. So that we can not treat WS_CAPTION as our full screen condition.
This fixes maximizing Tencent WeChat by dragging it to screen edge.
Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winex11.drv/event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 99943478729..1772a27c48b 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -1163,7 +1163,7 @@ static BOOL X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev )
data->window_rect.bottom - data->window_rect.top, cx, cy );
style = GetWindowLongW( data->hwnd, GWL_STYLE );
- if ((style & WS_CAPTION) == WS_CAPTION)
+ if ((style & WS_CAPTION) == WS_CAPTION || !is_window_rect_full_screen( &data->whole_rect ))
{
read_net_wm_states( event->display, data );
if ((data->net_wm_state & (1 << NET_WM_STATE_MAXIMIZED)))