[PATCH 0/2] MR9797: winex11: Track SWP_(SHOW|HIDE)WINDOW for window visibility.
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/winex11.drv/window.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index e5cf1c90080..baed7607de6 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1681,8 +1681,7 @@ static UINT window_update_client_state( struct x11drv_win_data *data ) if (data->mwm_hints_serial) return 0; /* another MWM_HINT update is pending, wait for it to complete */ if (data->configure_serial) return 0; /* another config update is pending, wait for it to complete */ - new_style = old_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); - if (data->current_state.wm_state != WithdrawnState) new_style |= WS_VISIBLE; + new_style = old_style & ~(WS_MINIMIZE | WS_MAXIMIZE); if (data->current_state.wm_state == IconicState) new_style |= WS_MINIMIZE; if (data->current_state.net_wm_state & (1 << NET_WM_STATE_MAXIMIZED)) new_style |= WS_MAXIMIZE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9797
From: Rémi Bernon <rbernon@codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59098 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59069 --- dlls/winex11.drv/window.c | 4 ++++ dlls/winex11.drv/x11drv.h | 1 + 2 files changed, 5 insertions(+) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index baed7607de6..99ae41c9298 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -3256,6 +3256,10 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN data->is_fullscreen = fullscreen; data->is_resizable = !!(swp_flags & WINE_SWP_RESIZABLE); + if (swp_flags & SWP_SHOWWINDOW) data->is_visible = 1; + else if (swp_flags & SWP_HIDEWINDOW) data->is_visible = 0; + new_style = (new_style & ~WS_VISIBLE) | (data->is_visible ? WS_VISIBLE : 0); + TRACE( "win %p/%lx new_rects %s style %08x flags %08x\n", hwnd, data->whole_window, debugstr_window_rects(new_rects), new_style, swp_flags ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 9232988c9c7..69bb77fe38a 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -674,6 +674,7 @@ struct x11drv_win_data UINT add_taskbar : 1; /* does window should be added to taskbar regardless of style */ UINT is_fullscreen : 1; /* is the window visible rect fullscreen */ UINT is_offscreen : 1; /* has been moved offscreen by the window manager */ + UINT is_visible : 1; /* window has been shown with SWP_SHOWWINDOW */ UINT parent_invalid : 1; /* is the parent host window possibly invalid */ UINT reparenting : 1; /* window is being reparented, likely from a decoration change */ UINT is_resizable : 1; /* window is allowed to be resized by the window manager */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9797
Instead of !9793 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9797#note_125831
Sorry, this makes it even worse for the application it's supposed to fix... -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9797#note_125833
This merge request was closed by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9797
participants (2)
-
Rémi Bernon -
Rémi Bernon (@rbernon)