Skip to content

Commit

Permalink
fix protocol error when destroying Wallpaper
Browse files Browse the repository at this point in the history
  • Loading branch information
LGFae committed Jun 12, 2024
1 parent 316fa39 commit 57f5337
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions daemon/src/wallpaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ pub(crate) fn commit_wallpapers(wallpapers: &[Arc<Wallpaper>]) {
impl Drop for Wallpaper {
fn drop(&mut self) {
// note we shouldn't panic in a drop implementation
if let Err(e) = wl_surface::req::destroy(self.wl_surface) {
error!("error destroying wl_surface: {e:?}");
}

if let Err(e) = wp_viewport::req::destroy(self.wp_viewport) {
error!("error destroying wp_viewport: {e:?}");
}
Expand All @@ -502,6 +500,10 @@ impl Drop for Wallpaper {
error!("error destroying zwlr_layer_surface_v1: {e:?}");
}

if let Err(e) = wl_surface::req::destroy(self.wl_surface) {
error!("error destroying wl_surface: {e:?}");
}

if let Ok(read) = self.inner.read() {
debug!(
"Destroyed output {} - {}",
Expand Down

0 comments on commit 57f5337

Please sign in to comment.