Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Rename the internal backplate vocabulary to root plate (cce-ui RFC 7a-4)
Mechanical rename, no behaviour change: the surface config fields
root_plate_{color,blur,corner_radius} and their defaults, the flat-form
keys of the same name, LayoutConfig::root_plate_corner_radius,
Window::root_plate_radius_base, and comment prose. The legacy
`backplate` KDL fixtures stay literal in the test that proves they are
ignored.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
src/server/config.rs | 72 ++++++++++++++++++++++----------------------
src/server/output.rs | 2 +-
src/server/window.rs | 24 +++++++--------
src/server/window_manager.rs | 2 +-
src/server/xdg_toplevel.rs | 2 +-
5 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/src/server/config.rs b/src/server/config.rs
index a064b7d..3c6d740 100644
--- a/src/server/config.rs
+++ b/src/server/config.rs
@@ -58,7 +58,7 @@ pub struct Layout {
pub grid_gap: i32,
pub border_blur: bool,
pub window_blur: bool,
- pub backplate_corner_radius: i32,
+ pub root_plate_corner_radius: i32,
pub overlay_behavior: String,
pub overlay_width: i32,
pub overlay_position: String,
@@ -163,10 +163,10 @@ impl Layout {
cell_w: self.desktop_cell_width,
cell_h: self.desktop_cell_height,
gap_width: self.desktop_gap_width as f64,
- // Cells inherit the window backplate radius: a tiled window's
+ // Cells inherit the window root plate radius: a tiled window's
// content covers exactly the visible cell box, so its arc sits
// precisely on the cell's arc underneath.
- cell_corner_radius: self.backplate_corner_radius,
+ cell_corner_radius: self.root_plate_corner_radius,
cell_fade_inset: self.desktop_cell_fade_inset as i32,
fade_mode: GridFadeMode::from_name(&self.desktop_grid_fade_mode),
})
@@ -219,7 +219,7 @@ impl Default for Layout {
grid_gap: 18,
border_blur: false,
window_blur: false,
- backplate_corner_radius: 12,
+ root_plate_corner_radius: 12,
overlay_behavior: "inline".to_string(),
overlay_width: 360,
overlay_position: "left".to_string(),
@@ -493,12 +493,12 @@ pub struct SurfaceConfig {
pub desktop_edge_pan_band: i64,
#[serde(default = "default_desktop_edge_pan_speed")]
pub desktop_edge_pan_speed: i64,
- #[serde(default = "default_backplate_color")]
- pub backplate_color: String,
- #[serde(default = "default_backplate_blur")]
- pub backplate_blur: f64,
- #[serde(default = "default_backplate_corner_radius")]
- pub backplate_corner_radius: i64,
+ #[serde(default = "default_root_plate_color")]
+ pub root_plate_color: String,
+ #[serde(default = "default_root_plate_blur")]
+ pub root_plate_blur: f64,
+ #[serde(default = "default_root_plate_corner_radius")]
+ pub root_plate_corner_radius: i64,
#[serde(default = "default_border_width")]
pub border_width: i64,
#[serde(default = "default_border_color")]
@@ -610,9 +610,9 @@ impl Default for SurfaceConfig {
desktop_edge_pan: default_desktop_edge_pan(),
desktop_edge_pan_band: default_desktop_edge_pan_band(),
desktop_edge_pan_speed: default_desktop_edge_pan_speed(),
- backplate_color: default_backplate_color(),
- backplate_blur: default_backplate_blur(),
- backplate_corner_radius: default_backplate_corner_radius(),
+ root_plate_color: default_root_plate_color(),
+ root_plate_blur: default_root_plate_blur(),
+ root_plate_corner_radius: default_root_plate_corner_radius(),
border_width: default_border_width(),
border_color: default_border_color(),
border_color_focused: None,
@@ -701,15 +701,15 @@ fn default_desktop_edge_pan_speed() -> i64 {
1000
}
-fn default_backplate_color() -> String {
+fn default_root_plate_color() -> String {
"#151520e6".to_string()
}
-fn default_backplate_blur() -> f64 {
+fn default_root_plate_blur() -> f64 {
0.8
}
-fn default_backplate_corner_radius() -> i64 {
+fn default_root_plate_corner_radius() -> i64 {
12
}
@@ -1982,7 +1982,7 @@ fn parse_kdl_config(content: &str) -> Result<Config, String> {
// RFC Phase 7a (cce-ui): `plate { root ... }` is the one
// spelling of the root-plate style; the compositor reads
// the silhouette values from this block. The legacy
- // `backplate` read-alias was removed 2026-09-06 after
+ // `root plate` read-alias was removed 2026-09-06 after
// every live config had migrated.
let root_plate_node = surface_children
.nodes()
@@ -1990,14 +1990,14 @@ fn parse_kdl_config(content: &str) -> Result<Config, String> {
.find(|n| n.name().value() == "plate")
.and_then(|n| n.children())
.and_then(|c| c.nodes().iter().find(|n| n.name().value() == "root"));
- if let Some(backplate_node) = root_plate_node {
+ if let Some(root_node) = root_plate_node {
found_nested = true;
- for entry in backplate_node.entries() {
+ for entry in root_node.entries() {
if let Some(id) = entry.name() {
match id.value() {
"color" => {
if let Some(val) = entry.value().as_string() {
- surface.backplate_color = val.to_string();
+ surface.root_plate_color = val.to_string();
}
}
"blur" => {
@@ -2015,12 +2015,12 @@ fn parse_kdl_config(content: &str) -> Result<Config, String> {
}
}
}
- surface.backplate_blur = val;
+ surface.root_plate_blur = val;
}
}
"corner_radius" => {
if let Some(val) = entry.value().as_i64() {
- surface.backplate_corner_radius = val;
+ surface.root_plate_corner_radius = val;
}
}
_ => {}
@@ -2170,7 +2170,7 @@ fn parse_kdl_config(content: &str) -> Result<Config, String> {
surface.shadow_enabled = val;
}
}
- // Named `blur` to match the status/backplate blur keys.
+ // Named `blur` to match the status/root plate blur keys.
"blur" => {
if let Some(val) = entry.value().as_f64() {
surface.shadow_sigma = val;
@@ -2236,9 +2236,9 @@ fn parse_kdl_config(content: &str) -> Result<Config, String> {
surface.desktop_edge_pan = get_child_arg_bool(node, "desktop_edge_pan", default_desktop_edge_pan());
surface.desktop_edge_pan_band = get_child_arg_i64(node, "desktop_edge_pan_band", default_desktop_edge_pan_band());
surface.desktop_edge_pan_speed = get_child_arg_i64(node, "desktop_edge_pan_speed", default_desktop_edge_pan_speed());
- surface.backplate_color = get_child_arg_string(node, "backplate_color", &default_backplate_color());
- surface.backplate_blur = get_child_arg_f64(node, "backplate_blur", default_backplate_blur());
- surface.backplate_corner_radius = get_child_arg_i64(node, "backplate_corner_radius", default_backplate_corner_radius());
+ surface.root_plate_color = get_child_arg_string(node, "root_plate_color", &default_root_plate_color());
+ surface.root_plate_blur = get_child_arg_f64(node, "root_plate_blur", default_root_plate_blur());
+ surface.root_plate_corner_radius = get_child_arg_i64(node, "root_plate_corner_radius", default_root_plate_corner_radius());
surface.border_width = get_child_arg_i64(node, "border_width", default_border_width());
surface.border_color = get_child_arg_string(node, "border_color", &default_border_color());
surface.border_color_focused = get_child_arg_string_opt(node, "border_color_focused");
@@ -2441,8 +2441,8 @@ pub fn parse_config(path: &str, state: &mut crate::window_manager::WindowManager
state.layout.transition_duration = config.layout.transition_duration as i32;
state.layout.grid_gap = config.layout.grid_gap as i32;
state.layout.border_blur = false;
- state.layout.window_blur = config.surface.backplate_blur > 0.001;
- state.layout.backplate_corner_radius = config.surface.backplate_corner_radius as i32;
+ state.layout.window_blur = config.surface.root_plate_blur > 0.001;
+ state.layout.root_plate_corner_radius = config.surface.root_plate_corner_radius as i32;
state.layout.overlay_behavior = config.layout.overlay_behavior;
state.layout.overlay_width = config.layout.overlay_width as i32;
state.layout.overlay_position = config.layout.overlay_position;
@@ -2450,8 +2450,8 @@ pub fn parse_config(path: &str, state: &mut crate::window_manager::WindowManager
state.layout.status_normal_color = config.layout.status_normal_color.clone();
state.layout.status_background_blur = config.layout.status_background_blur as f32;
state.layout.transparency_opacity = config.transparency.as_ref().and_then(|t| t.opacity).unwrap_or(0.9) as f32;
- let backplate_rgba = parse_hex_color_rgba(&config.surface.backplate_color);
- state.layout.window_opacity = backplate_rgba[3] < 0.999;
+ let root_plate_rgba = parse_hex_color_rgba(&config.surface.root_plate_color);
+ state.layout.window_opacity = root_plate_rgba[3] < 0.999;
state.layout.scenefx_optimized_blur = config.output.as_ref().map(|o| o.scenefx_optimized_blur).unwrap_or(true);
state.layout.status_backdrop_blur_ignore_transparent = config.layout.status_backdrop_blur_ignore_transparent;
state.layout.window_backdrop_blur_ignore_transparent = config.layout.window_backdrop_blur_ignore_transparent;
@@ -2701,14 +2701,14 @@ mod tests {
parse_config(&path, &mut server.wm).unwrap();
assert!(!server.wm.layout.desktop_gap_color.is_empty());
assert!(server.wm.layout.desktop_gap_width >= 0);
- assert!(server.wm.layout.backplate_corner_radius >= 0);
+ assert!(server.wm.layout.root_plate_corner_radius >= 0);
println!("TEST_WM_STARTUP: {:?}", server.wm.startup);
println!("TEST_WM_PATH: {:?}", std::env::var("PATH"));
}
}
/// RFC Phase 7a: `plate { root ... }` is the one root-plate spelling; a
- /// legacy `backplate` node is ignored (its read-alias was removed
+ /// legacy `root plate` node is ignored (its read-alias was removed
/// 2026-09-06), so the defaults stand when only it is present.
#[test]
fn test_plate_root_canonical_spelling() {
@@ -2723,8 +2723,8 @@ style {
}
"##;
let config = parse_kdl_config(canonical).unwrap();
- assert_eq!(config.surface.backplate_corner_radius, 21, "canonical read; legacy ignored");
- assert_eq!(config.surface.backplate_color, "#11223344");
+ assert_eq!(config.surface.root_plate_corner_radius, 21, "canonical read; legacy ignored");
+ assert_eq!(config.surface.root_plate_color, "#11223344");
// The legacy spelling alone is not read: the defaults stand.
let legacy = r##"
@@ -2735,8 +2735,8 @@ style {
}
"##;
let config = parse_kdl_config(legacy).unwrap();
- assert_eq!(config.surface.backplate_corner_radius, default_backplate_corner_radius(), "legacy spelling is not read");
- assert_eq!(config.surface.backplate_color, default_backplate_color());
+ assert_eq!(config.surface.root_plate_corner_radius, default_root_plate_corner_radius(), "legacy spelling is not read");
+ assert_eq!(config.surface.root_plate_color, default_root_plate_color());
}
#[test]
diff --git a/src/server/output.rs b/src/server/output.rs
index fb68875..fa2daae 100644
--- a/src/server/output.rs
+++ b/src/server/output.rs
@@ -1340,7 +1340,7 @@ impl Output {
let cell_radius = crate::window::widen_corner_radius(
cells.corner_radius_px, cells.cell_w_px, cells.cell_h_px,
);
- // The backplate-edge roll (mirroring cce-grid): the
+ // The root plate-edge roll (mirroring cce-grid): the
// bevel-width knob clamped to a fraction of the
// rail, pre-scaled by zoom like every cell metric,
// so the rail reads as a flat face with a narrow
diff --git a/src/server/window.rs b/src/server/window.rs
index 8b98e30..0cd98ab 100644
--- a/src/server/window.rs
+++ b/src/server/window.rs
@@ -2711,13 +2711,13 @@ impl Window {
w.min(h) / 2
} else if is_status {
// Status segments draw their own module-box corners. The
- // backplate clip is invisible on a bar-thin segment (the
+ // root plate clip is invisible on a bar-thin segment (the
// half-extent cap keeps it inside the transparent band) but
// carves visible sweeps into an EXPANDED segment's in-surface
// menu box once the cap stops binding.
0
} else if self.wm_requested.ssd || is_decorated {
- (*self.server).wm.layout.backplate_corner_radius
+ (*self.server).wm.layout.root_plate_corner_radius
} else {
0
};
@@ -3200,7 +3200,7 @@ impl Window {
// paths drive the same nodes and must agree.
0
} else if self.wm_requested.ssd || is_decorated {
- (*self.server).wm.layout.backplate_corner_radius
+ (*self.server).wm.layout.root_plate_corner_radius
} else {
0
};
@@ -3279,14 +3279,14 @@ impl Window {
}
}
- /// The backplate / content-clip corner radius in logical px, before span
+ /// The root plate / content-clip corner radius in logical px, before span
/// widening. Single source for every writer of that radius: the two render
- /// paths clip the surface with it, and `draw_borders` shapes the backplate
+ /// paths clip the surface with it, and `draw_borders` shapes the root plate
/// rect with it. Those disagreed — draw_borders applied the BORDER ring's
- /// radius to the backplate node and, running last, silently overrode the
+ /// radius to the root plate node and, running last, silently overrode the
/// value set_rendering_state had just written, making
- /// `backplate_corner_radius` dead config.
- pub unsafe fn backplate_radius_base(&self) -> i32 {
+ /// `root_plate_corner_radius` dead config.
+ pub unsafe fn root_plate_radius_base(&self) -> i32 {
if self.is_fullscreen() {
return 0;
}
@@ -3303,7 +3303,7 @@ impl Window {
}
let is_decorated = (*self.server).wm.is_decorated_app(&app_id);
if self.wm_requested.ssd || is_decorated {
- (*self.server).wm.layout.backplate_corner_radius
+ (*self.server).wm.layout.root_plate_corner_radius
} else {
0
}
@@ -3764,11 +3764,11 @@ impl Window {
ffi::river_scene_rect_set_size_if_changed(self.window_background, bg_width, bg_height);
ffi::wlr_scene_rect_set_color(self.window_background, border_color.as_ptr());
// The background plate sits directly under the client's plate, so it
- // takes the BACKPLATE radius and the same span widening as the
+ // takes the ROOT_PLATE radius and the same span widening as the
// blur/clip radius — not the border ring's radius, which is a
// separate key describing a different edge.
let bg_radius = widen_corner_radius(
- self.backplate_radius_base(),
+ self.root_plate_radius_base(),
self.box_geom.width,
self.box_geom.height,
);
@@ -3936,7 +3936,7 @@ impl Window {
let layout = &(*self.server).wm.layout;
// The ring hugs the window's own silhouette, so its outer arc IS
- // the window's content radius (the widened backplate radius the
+ // the window's content radius (the widened root plate radius the
// corner clip uses) rather than that plus a band.
let r_in = bg_radius;
// corner_len and gap are retired by the wave profile (the
diff --git a/src/server/window_manager.rs b/src/server/window_manager.rs
index 9cfbc2c..39c329a 100644
--- a/src/server/window_manager.rs
+++ b/src/server/window_manager.rs
@@ -684,7 +684,7 @@ impl WindowManager {
curr_out = (*curr_out).next;
}
let zoom = self.desk_zoom;
- let radius = (self.layout.backplate_corner_radius as f64 * zoom) as i32;
+ let radius = (self.layout.root_plate_corner_radius as f64 * zoom) as i32;
for p in &self.restore_placeholders {
let x = out_x + ((p.vx - self.desk_pan_x) * zoom).round() as i32;
let y = out_y + ((p.vy - self.desk_pan_y) * zoom).round() as i32;
diff --git a/src/server/xdg_toplevel.rs b/src/server/xdg_toplevel.rs
index 20667aa..3902ae9 100644
--- a/src/server/xdg_toplevel.rs
+++ b/src/server/xdg_toplevel.rs
@@ -700,7 +700,7 @@ unsafe extern "C" fn handle_commit(listener: *mut ffi::wl_listener, _data: *mut
// mirror): status segments draw their own module-box corners.
0
} else if (*window).wm_requested.ssd || is_decorated {
- (*(*window).server).wm.layout.backplate_corner_radius
+ (*(*window).server).wm.layout.root_plate_corner_radius
} else {
0
};