From 69ce370e984b451013895f8e3bbdf16b700afe64 Mon Sep 17 00:00:00 2001 From: BREW <81044362+b-re-w@users.noreply.github.com> Date: Tue, 10 Nov 2026 05:54:04 +0900 Subject: [PATCH] Fix: Lay the non-client view out from the browser view when the appbar changes width Whale records no frame view layout, so the non-client view above its browser view was never laid out and the page stayed where it was after the appbar showed again. Rivet now finds it as the browser view's grandparent and lays it out first. Co-Authored-By: Claude Opus 5.5 --- rivet/runtime/windows/src/hooks/page_area.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rivet/runtime/windows/src/hooks/page_area.rs b/rivet/runtime/windows/src/hooks/page_area.rs index aac6672..f141114 100644 --- a/rivet/runtime/windows/src/hooks/page_area.rs +++ b/rivet/runtime/windows/src/hooks/page_area.rs @@ -279,6 +279,14 @@ pub(crate) unsafe fn relayout(window: HWND) { }) { let layout: unsafe extern "system" fn(*mut c_void) = std::mem::transmute(base + row().layout_immediately); + // The browser view sits in the client view, below the non-client view that gives the + // client view its bounds. That view is laid out first, so a new appbar width reaches the + // page even where the frame view's own layout is not recorded, as on Whale. + if let Some(non_client) = crate::chromium::view::parent_of(host) + .and_then(|client| crate::chromium::view::parent_of(client)) + { + layout(non_client as *mut c_void); + } layout(host as *mut c_void); } }