1
0
Fork 0
forked from wry/wry

tree: make surface visibility tracking more robust

This commit is contained in:
Julian Orth 2024-03-29 20:07:28 +01:00
parent be0935c8dd
commit ba98103233
26 changed files with 313 additions and 144 deletions

View file

@ -351,6 +351,7 @@ impl SurfaceExt for ZwlrLayerSurfaceV1 {
fn after_apply_commit(self: Rc<Self>, _pending: &mut PendingState) {
let buffer_is_some = self.surface.buffer.is_some();
let was_mapped = self.mapped.get();
if self.mapped.get() {
if !buffer_is_some {
self.destroy_node();
@ -367,6 +368,9 @@ impl SurfaceExt for ZwlrLayerSurfaceV1 {
self.mapped.set(true);
self.compute_position();
}
if self.mapped.get() != was_mapped {
self.output.update_visible();
}
if self.mapped.get() {
match self.keyboard_interactivity.get() {
KI_NONE => {