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
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/init.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index ddb8101a2f7..b8184e59bb1 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -198,7 +198,7 @@ static BOOL needs_client_window_clipping( HWND hwnd ) { struct x11drv_win_data *data; RECT rect, client; - UINT ret = 0; + UINT ret = 0, clip_flags = 0, style; HRGN region; HDC hdc;
@@ -207,7 +207,11 @@ 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; + style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); + if (style & WS_CLIPCHILDREN) clip_flags |= DCX_CLIPCHILDREN; + if (style & WS_CLIPSIBLINGS) clip_flags |= DCX_CLIPSIBLINGS; + + if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | clip_flags ))) return FALSE; if ((region = NtGdiCreateRectRgn( 0, 0, 0, 0 ))) { ret = NtGdiGetRandomRgn( hdc, region, SYSRGN | NTGDI_RGN_MONITOR_DPI );
From: Rémi Bernon rbernon@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 b8184e59bb1..274ed51f585 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -215,7 +215,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 ); }
Alexandre Julliard (@julliard) commented about dlls/winex11.drv/init.c:
release_win_data( data ); OffsetRect( &client, -client.left, -client.top );
- if (!(hdc = NtUserGetDCEx( hwnd, 0, DCX_CACHE | DCX_CLIPCHILDREN ))) return FALSE;
- style = NtUserGetWindowLongW( hwnd, GWL_STYLE );
- if (style & WS_CLIPCHILDREN) clip_flags |= DCX_CLIPCHILDREN;
- if (style & WS_CLIPSIBLINGS) clip_flags |= DCX_CLIPSIBLINGS;
This could probably use DCX_USESTYLE.