Fix root surface tracking for sync subsurfaces

In particular, fixes screenshot-window with show-pointer on foot CSD.
This commit is contained in:
Ivan Molodetskikh
2026-01-10 15:26:20 +03:00
parent 539a5a8030
commit 19b1074a8b
+4 -4
View File
@@ -62,10 +62,6 @@ impl CompositorHandler for State {
on_commit_buffer_handler::<Self>(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()) {