mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Fix root surface tracking for sync subsurfaces
In particular, fixes screenshot-window with show-pointer on foot CSD.
This commit is contained in:
@@ -62,10 +62,6 @@ impl CompositorHandler for State {
|
|||||||
on_commit_buffer_handler::<Self>(surface);
|
on_commit_buffer_handler::<Self>(surface);
|
||||||
self.backend.early_import(surface);
|
self.backend.early_import(surface);
|
||||||
|
|
||||||
if is_sync_subsurface(surface) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let mut root_surface = surface.clone();
|
let mut root_surface = surface.clone();
|
||||||
while let Some(parent) = get_parent(&root_surface) {
|
while let Some(parent) = get_parent(&root_surface) {
|
||||||
root_surface = parent;
|
root_surface = parent;
|
||||||
@@ -76,6 +72,10 @@ impl CompositorHandler for State {
|
|||||||
.root_surface
|
.root_surface
|
||||||
.insert(surface.clone(), root_surface.clone());
|
.insert(surface.clone(), root_surface.clone());
|
||||||
|
|
||||||
|
if is_sync_subsurface(surface) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if surface == &root_surface {
|
if surface == &root_surface {
|
||||||
// This is a root surface commit. It might have mapped a previously-unmapped toplevel.
|
// 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()) {
|
if let Entry::Occupied(entry) = self.niri.unmapped_windows.entry(surface.clone()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user