Skip to content

Commit

Permalink
Update childwindow-proton patchsets for 8ba51a6 and move previous ver…
Browse files Browse the repository at this point in the history
…sions to legacy
  • Loading branch information
Tk-Glitch committed Jun 12, 2024
1 parent ccf50d0 commit 9105874
Show file tree
Hide file tree
Showing 5 changed files with 1,240 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

# Standalone child window support for vk - Fixes World of Final Fantasy and others - https://bugs.winehq.org/show_bug.cgi?id=45277 - legacy patchset for older trees applied at an earlier stage in the script
if ( [ "$_childwindow_fix" = "true" ] && [ "$_proton_fs_hack" != "true" ] && [ "$_use_staging" = "true" ] ); then
if git merge-base --is-ancestor 9e9d2d43c1d1931fd3450543b4913d339687d24c HEAD; then
if git merge-base --is-ancestor 8ba51a6f711c5466e060a5958cc15c31b2b2ac7d HEAD; then
_patchname='childwindow-proton.patch' && _patchmsg="Applied child window for vk patch" && nonuser_patcher
elif git merge-base --is-ancestor 9e9d2d43c1d1931fd3450543b4913d339687d24c HEAD; then
_patchname='childwindow-proton-8ba51a6.patch' && _patchmsg="Applied child window for vk patch" && nonuser_patcher
elif git merge-base --is-ancestor 64639c93c8cf03dc232b19365c1d0bc43969037c HEAD; then
_patchname='childwindow-proton-9e9d2d43.patch' && _patchmsg="Applied child window for vk patch" && nonuser_patcher
elif git merge-base --is-ancestor 5481415d438d41ac2b9fe42beb669d19af3af974 HEAD; then
Expand Down Expand Up @@ -44,8 +46,10 @@
fi

if ( [ "$_childwindow_fix" = "true" ] && [ "$_proton_fs_hack" != "true" ] && [ "$_use_staging" != "true" ] ); then
if git merge-base --is-ancestor 9e9d2d43c1d1931fd3450543b4913d339687d24c HEAD; then
if git merge-base --is-ancestor 8ba51a6f711c5466e060a5958cc15c31b2b2ac7d HEAD; then
_patchname='childwindow-proton-mainline.patch' && _patchmsg="Applied child window for vk patch (mainline)" && nonuser_patcher
elif git merge-base --is-ancestor 9e9d2d43c1d1931fd3450543b4913d339687d24c HEAD; then
_patchname='childwindow-proton-mainline-8ba51a6.patch' && _patchmsg="Applied child window for vk patch (mainline)" && nonuser_patcher
elif git merge-base --is-ancestor 64639c93c8cf03dc232b19365c1d0bc43969037c HEAD; then
_patchname='childwindow-proton-mainline-9e9d2d43.patch' && _patchmsg="Applied child window for vk patch (mainline)" && nonuser_patcher
elif git merge-base --is-ancestor 5481415d438d41ac2b9fe42beb669d19af3af974 HEAD; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ index 5b128afe3cb3c1f752ed0f90b0e3b06915d27420..29c9dfbdb72cc9dc433cdd61ae0b6fba
+ BOOL is_clipped;
+
+ NtUserGetClientRect( surface->hwnd, &client_rect, get_win_monitor_dpi(surface->hwnd));
+ NtUserMapWindowPoints( surface->hwnd, toplevel, (POINT *)&client_rect, 2 );
+ NtUserMapWindowPoints( surface->hwnd, toplevel, (POINT *)&client_rect, 2, 0 /* per-monitor DPI */ );
+ is_clipped = NtGdiRectInRegion( region, &client_rect );
+
+ if (is_clipped && !surface->offscreen_dc)
Expand Down Expand Up @@ -478,7 +478,7 @@ index c6bf49c6ec8bc83580a42abb3eb9314189280673..3a93ed89afe11e21464bf5211dd09636
+ HWND toplevel = NtUserGetAncestor( data->hwnd, GA_ROOT );
+ POINT pos = {data->client_rect.left, data->client_rect.top};
+
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1 );
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1, 0 /* per-monitor DPI */ );
+ changes.x = pos.x;
+ changes.y = pos.y;
+ }
Expand Down Expand Up @@ -532,7 +532,7 @@ index c6bf49c6ec8bc83580a42abb3eb9314189280673..3a93ed89afe11e21464bf5211dd09636
+
+ pos.x = data->client_rect.left;
+ pos.y = data->client_rect.top;
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1 );
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1, 0 /* per-monitor DPI */ );
+ }
+ if (!whole_window) whole_window = get_dummy_parent();
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ index 5b128afe3cb3c1f752ed0f90b0e3b06915d27420..29c9dfbdb72cc9dc433cdd61ae0b6fba
+ BOOL is_clipped;
+
+ NtUserGetClientRect( surface->hwnd, &client_rect, get_win_monitor_dpi(surface->hwnd));
+ NtUserMapWindowPoints( surface->hwnd, toplevel, (POINT *)&client_rect, 2 );
+ NtUserMapWindowPoints( surface->hwnd, toplevel, (POINT *)&client_rect, 2, 0 /* per-monitor DPI */ );
+ is_clipped = NtGdiRectInRegion( region, &client_rect );
+
+ if (is_clipped && !surface->offscreen_dc)
Expand Down Expand Up @@ -478,7 +478,7 @@ index c6bf49c6ec8bc83580a42abb3eb9314189280673..3a93ed89afe11e21464bf5211dd09636
+ HWND toplevel = NtUserGetAncestor( data->hwnd, GA_ROOT );
+ POINT pos = {data->client_rect.left, data->client_rect.top};
+
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1 );
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1, 0 /* per-monitor DPI */ );
+ changes.x = pos.x;
+ changes.y = pos.y;
+ }
Expand Down Expand Up @@ -532,7 +532,7 @@ index c6bf49c6ec8bc83580a42abb3eb9314189280673..3a93ed89afe11e21464bf5211dd09636
+
+ pos.x = data->client_rect.left;
+ pos.y = data->client_rect.top;
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1 );
+ NtUserMapWindowPoints( toplevel, toplevel, &pos, 1, 0 /* per-monitor DPI */ );
+ }
+ if (!whole_window) whole_window = get_dummy_parent();
+
Expand Down
Loading

0 comments on commit 9105874

Please sign in to comment.