From 42f24b7ee2cb5f715d137e61c6b7c4af3e27196a Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 6 Nov 2023 11:20:50 -0500 Subject: [PATCH] fix: draw sharp corners when the window is tiled, maximized, or fullscreen --- src/app/cosmic.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index 1c55517e..0b504a53 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -231,9 +231,15 @@ impl Cosmic { #[cfg(feature = "wayland")] Message::WindowState(id, state) => { if window::Id(0) == id { - self.app.core_mut().window.sharp_corners = - matches!(state, WindowState::ACTIVATED) - || state.contains(WindowState::TILED); + self.app.core_mut().window.sharp_corners = state.intersects( + WindowState::MAXIMIZED + | WindowState::FULLSCREEN + | WindowState::TILED + | WindowState::TILED_RIGHT + | WindowState::TILED_LEFT + | WindowState::TILED_TOP + | WindowState::TILED_BOTTOM, + ); } }