[PATCH v2 0/2] MR7014: winex11: Move GL/VK offscreen if the clipping region is NULLREGION.
NULLREGION means that the entire window should be clipped out, and its children displayed instead. The change broke some offscreening decisions when both parent and children have a GL drawable created but drawing actually happens on the child window. (Found while trying to reproduce otherwise unrelated regression in https://bugs.winehq.org/show_bug.cgi?id=52738, the game there uses ddraw and doesn't display anything after 786d9d1685ac220081b10cc779d4d331ddd2fc52) Fixes: 786d9d1685ac220081b10cc779d4d331ddd2fc52 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57503 -- v2: winex11: Move GL/VK offscreen if the clipping region is NULLREGION. winex11: Use DCX_USESTYLE when checking DC clipping regions. https://gitlab.winehq.org/wine/wine/-/merge_requests/7014
From: Rémi Bernon <rbernon(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57503 --- dlls/winex11.drv/init.c | 2 +- dlls/winex11.drv/vulkan.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index ddb8101a2f7..82232638382 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -207,7 +207,7 @@ static BOOL needs_client_window_clipping( HWND hwnd ) release_win_data( data ); OffsetRect( &client, -client.left, -client.top ); - if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | DCX_CLIPCHILDREN ))) return FALSE; + if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | DCX_USESTYLE ))) return FALSE; if ((region = NtGdiCreateRectRgn( 0, 0, 0, 0 ))) { ret = NtGdiGetRandomRgn( hdc, region, SYSRGN | NTGDI_RGN_MONITOR_DPI ); diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index 12f51fdcefd..79be36f44b8 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -224,7 +224,7 @@ static void X11DRV_vulkan_surface_presented( HWND hwnd, void *private, VkResult vulkan_surface_update_offscreen( hwnd, surface ); if (!surface->offscreen) return; - if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | DCX_CLIPCHILDREN ))) return; + if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | DCX_USESTYLE ))) return; window = X11DRV_get_whole_window( toplevel ); region = get_dc_monitor_region( hwnd, hdc ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7014
From: Rémi Bernon <rbernon(a)codeweavers.com> NULLREGION means that the entire window should be clipped out, and its children displayed instead. The change broke some offscreening decisions when both parent and children have a GL drawable created but drawing actually happens on the child window. Fixes: 786d9d1685ac220081b10cc779d4d331ddd2fc52 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57503 --- dlls/winex11.drv/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 82232638382..2c5e625ad83 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -211,7 +211,7 @@ static BOOL needs_client_window_clipping( HWND hwnd ) if ((region = NtGdiCreateRectRgn( 0, 0, 0, 0 ))) { ret = NtGdiGetRandomRgn( hdc, region, SYSRGN | NTGDI_RGN_MONITOR_DPI ); - if (ret > 0 && (ret = NtGdiGetRgnBox( region, &rect )) <= NULLREGION) ret = 0; + if (ret > 0 && (ret = NtGdiGetRgnBox( region, &rect )) < NULLREGION) ret = 0; if (ret == SIMPLEREGION && EqualRect( &rect, &client )) ret = 0; NtGdiDeleteObjectApp( region ); } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7014
participants (1)
-
Rémi Bernon