diff options
| author | srdusr <[email protected]> | 2025-02-06 09:28:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2025-02-06 09:28:00 +0200 |
| commit | ef2eff8f654884406c8989baf1ad345a2da43a58 (patch) | |
| tree | 6638e1b0d5fb573ecc8b8bc5e51ebeb3dfddee42 /crates/wayland/src/udev/platform.rs | |
| parent | d25f28c5a779438bef01106ba2b28874e24d5029 (diff) | |
| download | srdwm-ef2eff8f654884406c8989baf1ad345a2da43a58.tar.gz srdwm-ef2eff8f654884406c8989baf1ad345a2da43a58.zip | |
Fix layer surfaces spuriously hiding/re-showing on their own realization
sync_layer_visibility could not tell a real hide (null-buffer commit on
an already-visible surface) apart from a layer-shell client's ordinary
realization sequence (commit with no buffer -> configure -> ack-commit
with no buffer again -> attach real content): both look like "committed,
no buffer" from has_buffer alone. Every layer surface's first realization
was spuriously unmapped and immediately remapped, doubling LayerMap
arrange() passes on every single popup open.
Live-reproduced via an AGS peer session: a full-monitor click-outside-to-
close popup surface came back from a hit-test with geometry wider than
the real output after several open/close cycles on a wl_surface GTK had
reused across role destroy/recreate, and sat in the Top layer above every
real window with no input region set - silently swallowing clicks meant
for windows, dropdowns, and CSD title bars alike.
layer_surfaces_shown_once now gates the hide path on a surface having
actually shown a buffer at least once, and is cleared in layer_destroyed
so a reused wl_surface's next role starts clean rather than inheriting
the previous role's flag.
Diffstat (limited to 'crates/wayland/src/udev/platform.rs')
| -rw-r--r-- | crates/wayland/src/udev/platform.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/wayland/src/udev/platform.rs b/crates/wayland/src/udev/platform.rs index 8676a5a..14dd677 100644 --- a/crates/wayland/src/udev/platform.rs +++ b/crates/wayland/src/udev/platform.rs @@ -182,6 +182,7 @@ impl UdevPlatform { id_to_window: HashMap::new(), dead_layer_surfaces: HashSet::new(), hidden_layer_surfaces: HashMap::new(), + layer_surfaces_shown_once: HashSet::new(), decorations: HashMap::new(), border_top_decorations: HashMap::new(), border_bottom_decorations: HashMap::new(), |