From c21805bf705bd36a6eb7f79039b759e9af79dfcb Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 27 Dec 2023 21:51:42 +0400 Subject: layout: Refactor to support window decorations, add border and fullscreen backdrop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows are now wrapped in Tiles, which keep track of window-specific decorations. Particularly, I implemented a black fullscreen backdrop, which finally brings fullscreened windows smaller than the screen in line with how the Wayland protocol says they should look—centered in a black rectangle. I also implemented window borders, which are similar to the focus ring, but always visible (and hence affect the layout and sizing). --- src/layout/focus_ring.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/layout/focus_ring.rs') diff --git a/src/layout/focus_ring.rs b/src/layout/focus_ring.rs index cbcde19c..b5ead3e2 100644 --- a/src/layout/focus_ring.rs +++ b/src/layout/focus_ring.rs @@ -105,4 +105,12 @@ impl FocusRing { rv.into_iter() } + + pub fn width(&self) -> i32 { + self.width + } + + pub fn is_off(&self) -> bool { + self.is_off + } } -- cgit