diff options
Diffstat (limited to 'crates/wayland/src/winit')
| -rw-r--r-- | crates/wayland/src/winit/nested_platform.rs | 4 | ||||
| -rw-r--r-- | crates/wayland/src/winit/render.rs | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/crates/wayland/src/winit/nested_platform.rs b/crates/wayland/src/winit/nested_platform.rs index 3b762ab..b0fa529 100644 --- a/crates/wayland/src/winit/nested_platform.rs +++ b/crates/wayland/src/winit/nested_platform.rs @@ -117,7 +117,7 @@ impl Platform for WaylandPlatform { let usable = srdwm_core::Rect::new(zone.loc.x, zone.loc.y, zone.size.w as u32, zone.size.h as u32); let full_size = self.backend.window_size(); let full = srdwm_core::Rect::new(0, 0, full_size.w as u32, full_size.h as u32); - let maximize = crate::input::maximize_geometry_for(&self.output, full); + let maximize = crate::input::maximize_geometry_for(&self.output, full, self.wm.borrow().maximize_covers_dock); // Expanded into one `Monitor` per split part, exactly as // `udev/platform.rs`'s own `monitors()` does - see the split drain // in `poll` above for why this backend supports it at all. @@ -149,7 +149,7 @@ impl Platform for WaylandPlatform { // "usable, shrunk rect" `toggle_maximize` targets. let full = self.backend.window_size(); m.full_geometry = srdwm_core::Rect::new(0, 0, full.w as u32, full.h as u32); - m.maximize_geometry = crate::input::maximize_geometry_for(&self.output, m.full_geometry); + m.maximize_geometry = crate::input::maximize_geometry_for(&self.output, m.full_geometry, self.wm.borrow().maximize_covers_dock); m.primary = true; m }]) diff --git a/crates/wayland/src/winit/render.rs b/crates/wayland/src/winit/render.rs index ccc64a2..432ebba 100644 --- a/crates/wayland/src/winit/render.rs +++ b/crates/wayland/src/winit/render.rs @@ -313,7 +313,16 @@ impl WaylandPlatform { // doc comment further down; that's an overlap between two // pieces of this window's own decoration, not with its content, // so it doesn't contradict this paragraph.) - if w.border_width > 0 { + // No border on a maximized window. A maximized window's own + // edges are the screen's edges, so a border has nothing to + // separate it from - and where maximize *does* stop short (the + // strip a top bar reserves) the border lands in that gap, drawn + // as a hard line right against the bar. Reported live with a + // screenshot: a 4px accent line between the bar and the window, + // and none anywhere else, because the left/right/bottom strips + // fall off-screen. Fullscreen is already borderless for the + // same reason, via `decorated` being cleared. + if w.border_width > 0 && !w.maximized { let color = crate::state::effective_border_color(w.border_color, focused == Some(id), self.wm.borrow().theme.border_inactive_dim); let strips = decoration::border_strips(frame, w.border_width); // Strips 0/1 (top/bottom) are rounded on their own two |