Skip to content

Commit

Permalink
fix: draw sharp corners when the window is tiled, maximized, or fulls…
Browse files Browse the repository at this point in the history
…creen
  • Loading branch information
wash2 committed Nov 6, 2023
1 parent e0b34e5 commit 42f24b7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/app/cosmic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,15 @@ impl<T: Application> Cosmic<T> {
#[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,
);
}
}

Expand Down

0 comments on commit 42f24b7

Please sign in to comment.