From 19b1074a8b49760fc02c19edf86c4b92f229a9bf Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 10 Jan 2026 15:26:20 +0300 Subject: [PATCH] Fix root surface tracking for sync subsurfaces In particular, fixes screenshot-window with show-pointer on foot CSD. --- src/handlers/compositor.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handlers/compositor.rs b/src/handlers/compositor.rs index 8b8a04d3..f98a9824 100644 --- a/src/handlers/compositor.rs +++ b/src/handlers/compositor.rs @@ -62,10 +62,6 @@ impl CompositorHandler for State { on_commit_buffer_handler::(surface); self.backend.early_import(surface); - if is_sync_subsurface(surface) { - return; - } - let mut root_surface = surface.clone(); while let Some(parent) = get_parent(&root_surface) { root_surface = parent; @@ -76,6 +72,10 @@ impl CompositorHandler for State { .root_surface .insert(surface.clone(), root_surface.clone()); + if is_sync_subsurface(surface) { + return; + } + if surface == &root_surface { // This is a root surface commit. It might have mapped a previously-unmapped toplevel. if let Entry::Occupied(entry) = self.niri.unmapped_windows.entry(surface.clone()) {