From bcc8314dd543c57c87609d2778dae85ca788323f Mon Sep 17 00:00:00 2001 From: Leo Ring <59373587+leo030303@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:56:54 +0100 Subject: [PATCH] Servoshell: Update `Window::inner_size` on `WindowEvent::Resized` (fix resize bug) (#38461) Just adds back a line that was omitted when a different commit was reverted, see the issue for details, I've tested on Gnome Wayland with Fedora 42 and the bug is fixed Fixes: https://github.com/servo/servo/issues/38441 cc @yezhizhen Signed-off-by: Leo Ring --- ports/servoshell/desktop/headed_window.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/servoshell/desktop/headed_window.rs b/ports/servoshell/desktop/headed_window.rs index bbc4237a271..5bb97376204 100644 --- a/ports/servoshell/desktop/headed_window.rs +++ b/ports/servoshell/desktop/headed_window.rs @@ -687,6 +687,7 @@ impl WindowPortsMethods for Window { }, WindowEvent::Resized(new_inner_size) => { if self.inner_size.get() != new_inner_size { + self.inner_size.set(new_inner_size); // This should always be set to inner size // because we are resizing `SurfmanRenderingContext`. // See https://github.com/servo/servo/issues/38369#issuecomment-3138378527