After the change to move the sync_gl_drawable call outside the win_data mutex in 54d82ed4, the X11 client rect used for determining whether we need to composite/clip the drawable can be out of sync with the win32 side. This would result in offscreening when unnecessary and vice-versa.
-- v3: winex11: Use the win32 client rect in needs_client_window_clipping.
From: William Horvath william@horvath.blog
After the change to move the sync_gl_drawable call outside the win_data mutex in 54d82ed4, the X11 client rect used for determining whether we need to composite/clip the drawable can be out of sync with the win32 side. This results in offscreening when unnecessary and vice-versa. --- dlls/winex11.drv/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 71c50df95e6..a0bfab2fb46 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -196,21 +196,18 @@ static HFONT X11DRV_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
static BOOL needs_client_window_clipping( HWND hwnd ) { - struct x11drv_win_data *data; RECT rect, client; UINT ret = 0; HRGN region; HDC hdc;
- if (!(data = get_win_data( hwnd ))) return TRUE; - client = data->rects.client; - release_win_data( data ); + NtUserGetClientRect( hwnd, &client, NtUserGetDpiForWindow( hwnd ) ); OffsetRect( &client, -client.left, -client.top );
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 ); + ret = NtGdiGetRandomRgn( hdc, region, SYSRGN ); if (ret > 0 && (ret = NtGdiGetRgnBox( region, &rect )) < NULLREGION) ret = 0; if (ret == SIMPLEREGION && EqualRect( &rect, &client )) ret = 0; NtGdiDeleteObjectApp( region );
This merge request was approved by Rémi Bernon.