[PATCH 0/2] MR11726: winex11: Allow child D3D presentation on fullscreen exclusive toplevel.
While still ignoring child window clipping rules when toplevel window is presented. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=60095 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=60080 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11726
From: Rémi Bernon <rbernon@codeweavers.com> It already includes the present rect if any, relative to the toplevel visible rect. We lost the latter here, when rect computation was moved to win32u, and rendering was offsetted when present rect is set. --- dlls/winex11.drv/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index a3078d73d64..e8bfe11509d 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -382,23 +382,21 @@ static void X11DRV_client_surface_present( struct client_surface *client, HDC hd { struct x11drv_client_surface *surface = impl_from_client_surface( client ); HWND hwnd = client->hwnd, toplevel = client->toplevel; - RECT rect_dst, rect_src = client->virtual_rect, rect; + RECT rect_dst = client->monitor_rect, rect_src = client->virtual_rect, rect; Drawable window; HRGN region; if (!hdc) return; window = X11DRV_get_whole_window( toplevel ); - if (NtUserGetPresentRect( toplevel, &rect_dst, -1 /* raw dpi */ )) + if (NtUserGetPresentRect( toplevel, &rect, -1 /* raw dpi */ )) { region = 0; /* window is exclusive fullscreen, ignore everything else */ if (toplevel != hwnd) return; /* toplevel is exclusive fullscreen, don't present */ - OffsetRect( &rect_dst, -rect_dst.left, -rect_dst.top ); } else { region = get_dc_monitor_region( hwnd, hdc ); /* otherwise use the window region for clipping rules */ - rect_dst = client->monitor_rect; } if (get_dc_drawable( surface->hdc_dst, &rect ) != window || !EqualRect( &rect, &rect_dst )) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11726
From: Rémi Bernon <rbernon@codeweavers.com> While still ignoring child window clipping rules when toplevel window is presented. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=60095 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=60080 --- dlls/winex11.drv/init.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index e8bfe11509d..63d3ac284b6 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -389,15 +389,12 @@ static void X11DRV_client_surface_present( struct client_surface *client, HDC hd if (!hdc) return; window = X11DRV_get_whole_window( toplevel ); - if (NtUserGetPresentRect( toplevel, &rect, -1 /* raw dpi */ )) - { - region = 0; /* window is exclusive fullscreen, ignore everything else */ - if (toplevel != hwnd) return; /* toplevel is exclusive fullscreen, don't present */ - } - else - { - region = get_dc_monitor_region( hwnd, hdc ); /* otherwise use the window region for clipping rules */ - } + /* if window is exclusive fullscreen, ignore the window region clipping rules */ + if (hwnd == toplevel && NtUserGetPresentRect( toplevel, &rect, -1 /* raw dpi */ )) region = 0; + else region = get_dc_monitor_region( hwnd, hdc ); + + TRACE( "hwnd %p %s to toplevel %p %s region %p\n", hwnd, wine_dbgstr_rect(&rect_src), + toplevel, wine_dbgstr_rect(&rect_dst), region ); if (get_dc_drawable( surface->hdc_dst, &rect ) != window || !EqualRect( &rect, &rect_dst )) set_dc_drawable( surface->hdc_dst, window, &rect_dst, IncludeInferiors ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11726
participants (2)
-
Rémi Bernon -
Rémi Bernon (@rbernon)