From b83a4fa6205eab509f9258e10d4cc8b61e4980b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliaksandr=20Tru=C5=A1?= Date: Fri, 3 Jan 2025 13:08:29 +0100 Subject: [PATCH] fix(wayland): fix issue with tiled and maximized window Potential fix for #6262 --- window/src/os/wayland/window.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/window/src/os/wayland/window.rs b/window/src/os/wayland/window.rs index 79960b3e4a4..6693363f1d4 100644 --- a/window/src/os/wayland/window.rs +++ b/window/src/os/wayland/window.rs @@ -914,8 +914,8 @@ impl WaylandWindowInner { self.surface_factor = factor; } } + self.refresh_frame(); } - self.refresh_frame(); self.do_paint().unwrap(); } } @@ -1243,7 +1243,6 @@ impl WaylandState { .window_by_id(window_id) .expect("Inner Window should exist"); - let is_frame_hidden = window_inner.borrow().window_frame.is_hidden(); let p = window_inner.borrow().pending_event.clone(); let mut pending_event = p.lock().unwrap(); @@ -1280,31 +1279,6 @@ impl WaylandState { state |= WindowState::MAXIMIZED; } - // For MAXIMIZED and FULL_SCREEN window configure contains Windowed size. - // Replacing it with Wayland suggested bounds. - if state.intersects(WindowState::MAXIMIZED | WindowState::FULL_SCREEN) { - if let Some((w, h)) = configure.suggested_bounds { - pending_event.configure.replace((w, h)); - } - } else if configure - .state - .contains(SCTKWindowState::TILED_TOP | SCTKWindowState::TILED_BOTTOM) - && is_frame_hidden - { - // Tiled window without borders will take exactly half of the screen. - if let Some((w, h)) = configure.suggested_bounds { - pending_event.configure.replace((w / 2, h)); - } - } else if configure - .state - .contains(SCTKWindowState::TILED_LEFT | SCTKWindowState::TILED_RIGHT) - && is_frame_hidden - { - // Tiled window without borders will take exactly half of the screen. - if let Some((w, h)) = configure.suggested_bounds { - pending_event.configure.replace((w, h / 2)); - } - } log::debug!( "Config: self.window_state={:?}, states: {:?} {:?}", pending_event.window_state,