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

commitc2d429e056f61ff67996e75aea7235c95e48240a
parent0ad490f6fe
authorLucas Galante <[email protected]>
date2026-08-10 11:27
feat: traveling light_source segment stacks in front of its siblings

It crosses over the top-edge modules around midday; sort it to the
tail of the status window list so the render_finish reorder raises it
last within the layer — a per-frame rule, not a one-shot raise.

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/server/window_manager.rs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/server/window_manager.rs b/src/server/window_manager.rs
index 469b95f..be9b4f7 100644
--- a/src/server/window_manager.rs
+++ b/src/server/window_manager.rs
@@ -2411,6 +2411,14 @@ impl WindowManager {
                 }
             }
         }
+        // The traveling light_source segment crosses over its siblings on
+        // the top edge; sorting it to the tail makes it the last segment
+        // moved to the render-list end, so the reorder pass raises it last
+        // — in front of every other segment. (Stacking rules live in this
+        // per-frame path, never as one-shot raises.)
+        status_bar_windows.sort_by_key(|&w| {
+            (*w).get_app_id_string().map_or(false, |id| id.ends_with("light_source"))
+        });
         for win_ptr in status_bar_windows {
             let node_link = &mut (*win_ptr).node.link as *mut ffi::wl_list as *mut WlList;
             let list_head = &mut self.rendering_requested.list as *mut ffi::wl_list as *mut WlList;