window management library
git clone https://git.lucas.co/cce-window-manager.git
refactor: DecorationSpec has no corner radius — a window has one
`corner_radius` on DecorationSpec was the border's own key
(`style.surface.border.corner_radius`), set from config and read by
nothing: the compositor shapes the content clip, the root plate, the
border ring, the frame and the corner discs from `plate.root.
corner_radius` alone (Window::root_plate_radius_base), and the desktop
grid's cells take the same value. Dead config that looked like a second
knob, and it is gone.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
src/api.rs | 8 +++++++-
src/arrange.rs | 4 ----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/api.rs b/src/api.rs
index 72e27f3..d501cf5 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -235,11 +235,17 @@ pub struct GridPatch {
pub struct Rgba(pub [f32; 4]);
/// Server-side decoration for one window: borders now, titlebars later.
+///
+/// No corner radius here (removed 2026-09-28): a window has ONE corner
+/// radius, `style.surface.plate.root.corner_radius`, which the compositor
+/// clips the content with, shapes the root plate, the border ring and its
+/// corner discs with, and rounds the desktop grid's cells with. The
+/// `corner_radius` this carried was the border's own key, set from config
+/// and read by nothing — dead config that looked like a second knob.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct DecorationSpec {
pub border_width: i32,
pub border_color: Rgba,
- pub corner_radius: i32,
}
/// Declarative per-window scenefx effects.
diff --git a/src/arrange.rs b/src/arrange.rs
index dc4ca7f..67a6125 100644
--- a/src/arrange.rs
+++ b/src/arrange.rs
@@ -1029,7 +1029,6 @@ fn decoration_for(p: &ArrangeParams, is_focused: bool, mode: TilingMode) -> Deco
if mode == TilingMode::Fullscreen {
return DecorationSpec {
border_width: 0,
- corner_radius: 0,
..p.decoration
};
}
@@ -1901,7 +1900,6 @@ mod tests {
decoration: DecorationSpec {
border_width: 0,
border_color: crate::api::Rgba([0.1, 0.2, 0.3, 0.4]),
- corner_radius: 0,
},
border_color_focused: crate::api::Rgba([0.9, 0.1, 0.1, 1.0]),
overlay: OverlayParams {
@@ -1991,12 +1989,10 @@ mod tests {
w.mode = TilingMode::Fullscreen;
let mut p = arrange_params();
p.decoration.border_width = 4;
- p.decoration.corner_radius = 12;
let plan = arrange(&[w], &one_output(), &p);
let dec = plan.windows[0].decoration.unwrap();
assert_eq!(dec.border_width, 0);
- assert_eq!(dec.corner_radius, 0);
}
#[test]