git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit9af3f2638374b0a65dae2bd0ab17552608860466
parentccd5d02b67
authorLucas Galante <lsgalante12@gmail.com>
date2026-09-26 17:40
fix(xdg): let a Popup window's border follow its own size

cce-cloud's launcher flags itself a Popup (set_popup) and auto-sizes to
its filtered list, and the WM's Popup arm echoes box_geom back as the
size. handle_commit refreshed box_geom from the client's committed
geometry only for Overlay and Utility windows, so a Popup's border and
blur stayed at the size it opened at while the list shrank and grew
under them as the user typed. Popup now takes the same path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

 src/server/xdg_toplevel.rs | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/server/xdg_toplevel.rs b/src/server/xdg_toplevel.rs
index 315190a2..4955705b 100644
--- a/src/server/xdg_toplevel.rs
+++ b/src/server/xdg_toplevel.rs
@@ -810,10 +810,16 @@ unsafe extern "C" fn handle_commit(listener: *mut ffi::wl_listener, _data: *mut
     // the external window-manager client) leaves the border a size behind.
     // Utility windows self-size the same way (the arrange pass only ever
     // sends them the "you choose" 0x0, so every size change originates in a
-    // client commit like this one).
+    // client commit like this one). So do Popups: cce-cloud's launcher flags
+    // itself one via set_popup and auto-sizes to its filtered list, and the
+    // WM's Popup arm echoes box_geom back as the size — so without this the
+    // border and blur stayed at the size the popup opened at while the list
+    // shrank and grew under them as the user typed.
     if matches!(
         (*window).tiling_mode,
-        crate::tiling::TilingMode::Overlay | crate::tiling::TilingMode::Utility
+        crate::tiling::TilingMode::Overlay
+            | crate::tiling::TilingMode::Utility
+            | crate::tiling::TilingMode::Popup
     ) {
         let mut live = std::mem::zeroed();
         ffi::river_wlr_xdg_surface_get_geometry(base, &mut live);