Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57665
With an empty clipping region, when the window is being shown, the Expose event we receive is ignored by `expose_window_surface`, assuming there's no redraw necessary. If a clipping region is set, we call `NtUserRedrawWindow` with `RDW_ERASE` which clears the window.
From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57665 --- dlls/win32u/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index ba204957669..3711c76f5a6 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1817,6 +1817,7 @@ static NTSTATUS get_window_region( HWND hwnd, BOOL surface, HRGN *region, RECT * if (!(status = wine_server_call( req ))) { size_t reply_size = wine_server_reply_size( reply ); + *visible = wine_server_get_rect( reply->visible_rect ); if (reply_size) { data->rdh.dwSize = sizeof(data->rdh); @@ -1824,7 +1825,6 @@ static NTSTATUS get_window_region( HWND hwnd, BOOL surface, HRGN *region, RECT * data->rdh.nCount = reply_size / sizeof(RECT); data->rdh.nRgnSize = reply_size; *region = NtGdiExtCreateRegion( NULL, data->rdh.dwSize + data->rdh.nRgnSize, data ); - *visible = wine_server_get_rect( reply->visible_rect ); } } else size = reply->total_size;
From: Rémi Bernon rbernon@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57665 --- dlls/win32u/window.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 3711c76f5a6..bf7c01385bd 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -1818,6 +1818,10 @@ static NTSTATUS get_window_region( HWND hwnd, BOOL surface, HRGN *region, RECT * { size_t reply_size = wine_server_reply_size( reply ); *visible = wine_server_get_rect( reply->visible_rect ); + + /* if the clipping region is requested, return an empty region if it already matches the visible rect */ + if (surface && reply_size == sizeof(*visible) && EqualRect( visible, (RECT *)data->Buffer )) reply_size = 0; + if (reply_size) { data->rdh.dwSize = sizeof(data->rdh);