diff --git a/release-notes.md b/release-notes.md index c4b37960..08ef449a 100644 --- a/release-notes.md +++ b/release-notes.md @@ -5,6 +5,8 @@ - Add support for virtual-keyboard-unstable-v1. - Add support for zwp_input_method_manager_v2. - Add support for zwp_text_input_manager_v3. +- Add support for push-to-talk. +- Various bugfixes. # 1.0.3 (2024-04-11) diff --git a/src/backends/metal/video.rs b/src/backends/metal/video.rs index 4a598416..9d17d04c 100644 --- a/src/backends/metal/video.rs +++ b/src/backends/metal/video.rs @@ -765,6 +765,9 @@ impl MetalConnector { if let Err(e) = changes.commit(DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_PAGE_FLIP_EVENT, 0) { if let DrmError::Atomic(OsError(c::EACCES)) = e { log::debug!("Could not perform atomic commit, likely because we're no longer the DRM master"); + self.render_result + .borrow_mut() + .discard_presentation_feedback(); return Ok(()); } if let Some(fb) = &new_fb { @@ -784,6 +787,9 @@ impl MetalConnector { } } } + self.render_result + .borrow_mut() + .discard_presentation_feedback(); Err(MetalError::Commit(e)) } else { if let Some(fb) = new_fb { @@ -1792,10 +1798,7 @@ impl MetalBackend { let _ = fb.client.remove_obj(&*fb); } } else { - for fb in rr.presentation_feedbacks.drain(..) { - fb.send_discarded(); - let _ = fb.client.remove_obj(&*fb); - } + rr.discard_presentation_feedback(); } } } diff --git a/src/ifs/wl_surface.rs b/src/ifs/wl_surface.rs index 63f12004..3d2233b0 100644 --- a/src/ifs/wl_surface.rs +++ b/src/ifs/wl_surface.rs @@ -1215,7 +1215,9 @@ impl WlSurface { let children = self.children.borrow_mut(); if let Some(children) = children.deref() { for child in children.subsurfaces.values() { - child.surface.set_visible(visible); + if child.surface.buffer.is_some() { + child.surface.set_visible(visible); + } } } if !visible { diff --git a/src/renderer.rs b/src/renderer.rs index 4f23949c..502c817e 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -42,6 +42,13 @@ impl RenderResult { let _ = fr.client.remove_obj(&*fr); } } + + pub fn discard_presentation_feedback(&mut self) { + for fb in self.presentation_feedbacks.drain(..) { + fb.send_discarded(); + let _ = fb.client.remove_obj(&*fb); + } + } } impl Debug for RenderResult {