Otherwise, the client rect in [needs_client_window_clipping](https://gitlab.winehq.org/wine/wine/-/blob/3f7ff8b5896394a3edd2d3d49f6d118f8...) is outdated, which can result in offscreening when it's not necessary or vice-versa.
This keeps the intention of 54d82ed4d5483f7569871219acc485b3cb5a224e while restoring the previous behavior.
From: William Horvath william@horvath.blog
Otherwise, the client rect in needs_client_window_clipping is outdated. --- dlls/winex11.drv/window.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1d43c4edbdb..a5950ef1a70 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2930,9 +2930,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN struct window_rects old_rects; BOOL was_fullscreen;
- sync_gl_drawable( hwnd, FALSE ); - - if (!(data = get_win_data( hwnd ))) return; + if (!(data = get_win_data( hwnd ))) goto done;
old_style = new_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); if (data->desired_state.wm_state != WithdrawnState) old_style |= WS_VISIBLE; @@ -2954,7 +2952,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN if (!data->whole_window) { release_win_data( data ); - return; + goto done; }
if (old_style & WS_VISIBLE) @@ -2965,7 +2963,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN release_win_data( data ); unmap_window( hwnd ); if (was_fullscreen) NtUserClipCursor( NULL ); - if (!(data = get_win_data( hwnd ))) return; + if (!(data = get_win_data( hwnd ))) goto done; } }
@@ -3003,7 +3001,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN release_win_data( data ); if (needs_icon) fetch_icon_data( hwnd, 0, 0 ); if (needs_map) map_window( hwnd, new_style ); - return; + goto done; } else if ((swp_flags & SWP_STATECHANGED) && ((old_style ^ new_style) & WS_MINIMIZE)) { @@ -3019,6 +3017,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN
XFlush( data->display ); /* make sure changes are done before we start painting again */ release_win_data( data ); +done: + sync_gl_drawable( hwnd, FALSE ); }
/* check if the window icon should be hidden (i.e. moved off-screen) */
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150766
Your paranoid android.
=== debian11b (64 bit WoW report) ===
kernel32: comm.c:1574: Test failed: AbortWaitCts hComPortEvent failed comm.c:1586: Test failed: Unexpected time 1002, expected around 500
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000001A500F6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 win.c:4070: Test failed: Expected active window 0000000000F70186, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000000F70186, got 0000000000000000.
We could probably call `NtUserGetClientRect` in `needs_client_window_clipping` instead, this should work all the time and could be arguably more consistent with the region check which also uses win32u info.