From 90ab011127cce2ffeeb5744d6cd2b753fe2f117d Mon Sep 17 00:00:00 2001 From: Patryk Pilipczuk Date: Thu, 4 May 2023 00:37:14 +0200 Subject: [PATCH] WindowServer: Fix window content scaling when switching from fullscreen Resolves #18624 Switching to and from fullscreen produces a behaviour where window content too big in relation to window size. This patch fixes sent resize event to contain current window size. --- Userland/Services/WindowServer/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index 7239b13dbe..809247f2e5 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -855,9 +855,9 @@ void Window::set_fullscreen(bool fullscreen) new_window_rect = m_saved_nonfullscreen_rect; } + set_rect(new_window_rect); send_resize_event_to_client(); send_move_event_to_client(); - set_rect(new_window_rect); } WindowTileType Window::tile_type_based_on_rect(Gfx::IntRect const& rect) const