status bar
git clone https://git.lucas.co/cce-status-interface.git
fix: collapse the surface height when the in-surface menu closes
The first live probe caught the surface stuck at menu height after
close: rebuild_layout reset the width but not the height, and the
compositor deliberately stops enforcing size while a segment is thicker
than the bar — so nobody collapsed it. The no-menu path now explicitly
resets height to the bar strip; verified live: open 104x24→190x118,
close →104x24, neighbors frozen, zero configures either way.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/main.rs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/main.rs b/src/main.rs
index 73e84f1..6f3d990 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -649,6 +649,14 @@ impl StatusApp {
self.input_regions.clear();
self.input_regions.push((0, 0, self.width as i32, bar_h.round() as i32));
+ // No open menu: the surface is exactly the bar strip. This
+ // reset is what COLLAPSES an expanded surface after the menu
+ // closes — the compositor deliberately stops enforcing size
+ // while we are thicker than the bar, so nobody else will.
+ if self.context_menu.is_none() {
+ self.height = bar_h.round() as u32;
+ }
+
// In-surface context menu: grow the surface below the bar
// strip and draw the menu into the retained buffers. The
// panel reuses the module box pipeline (so box_bevel applies)