Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
fix: exclude cce-cloud popups from window-state save/restore
A cce-cloud popup open at save time was persisted with its owning
process's cmdline — the daemon's `cce-cloud --daemon` — so state restore
spawned a duplicate daemon each session, whose fresh socket bind
orphaned the systemd-managed cce-cloud.service instance. Skip cce-cloud
windows when saving and scrub previously persisted entries from
last_window_states.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/server/window_manager.rs | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/server/window_manager.rs b/src/server/window_manager.rs
index 5357227..e3854ac 100644
--- a/src/server/window_manager.rs
+++ b/src/server/window_manager.rs
@@ -296,11 +296,17 @@ impl WindowManager {
if (*w).is_status_bar() || (*w).is_wallpaper() {
continue;
}
-
+
let app_id = (*w).get_app_id_string().unwrap_or_default();
if app_id.is_empty() {
continue;
}
+ // cce-cloud surfaces are transient popups owned by the daemon, so
+ // their cmdline is `cce-cloud --daemon` — restoring one would spawn
+ // a duplicate daemon that steals the socket from cce-cloud.service.
+ if app_id == "cce-cloud" {
+ continue;
+ }
let title = (*w).get_title_string().unwrap_or_default();
let pid = (*w).unreliable_pid();
@@ -363,8 +369,10 @@ impl WindowManager {
last_states.push(win_state);
}
}
+ // Scrub entries persisted before the cce-cloud exclusion above.
+ last_states.retain(|s| s.app_id != "cce-cloud");
self.last_window_states = last_states;
-
+
let state = SavedState {
desk_pan_x: self.desk_pan_x,
desk_pan_y: self.desk_pan_y,