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()) {