forge
Explore
Log in

Don't you dare go Hollow

Fix root surface tracking for sync subsurfaces

Browse files at this commit

19b1074a8b49760fc02c19edf86c4b92f229a9bfIvan MolodetskikhParent: 539a5a8
In particular, fixes screenshot-window with show-pointer on foot CSD.
src/handlers/compositor.rsmodified+4 -4
@@ -62,10 +62,6 @@ impl CompositorHandler for State {
62 on_commit_buffer_handler::<Self>(surface);62 on_commit_buffer_handler::<Self>(surface);
63 self.backend.early_import(surface);63 self.backend.early_import(surface);
64 64
65- if is_sync_subsurface(surface) {
66- return;
67- }
68-
69 let mut root_surface = surface.clone();65 let mut root_surface = surface.clone();
70 while let Some(parent) = get_parent(&root_surface) {66 while let Some(parent) = get_parent(&root_surface) {
71 root_surface = parent;67 root_surface = parent;
@@ -76,6 +72,10 @@ impl CompositorHandler for State {
76 .root_surface72 .root_surface
77 .insert(surface.clone(), root_surface.clone());73 .insert(surface.clone(), root_surface.clone());
78 74
75+ if is_sync_subsurface(surface) {
76+ return;
77+ }
78+
79 if surface == &root_surface {79 if surface == &root_surface {
80 // This is a root surface commit. It might have mapped a previously-unmapped toplevel.80 // This is a root surface commit. It might have mapped a previously-unmapped toplevel.
81 if let Entry::Occupied(entry) = self.niri.unmapped_windows.entry(surface.clone()) {81 if let Entry::Occupied(entry) = self.niri.unmapped_windows.entry(surface.clone()) {