Fix root surface tracking for sync subsurfaces
Browse files at this commit19b1074a8b49760fc02c19edf86c4b92f229a9bfParent: 539a5a81 changed file +4 -4
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_surface | 72 | .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()) { |