From 5eeff3735fe1b9910910eb3b2ee5805f04f477f0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 10 Jun 2025 09:57:55 -0700 Subject: [PATCH] Send dmabuf feedback for dnd icon surface, and cursor surface --- src/state.rs | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/state.rs b/src/state.rs index 66f9926e..547034de 100644 --- a/src/state.rs +++ b/src/state.rs @@ -826,6 +826,50 @@ impl Common { .iter() .filter(|seat| &seat.active_output() == output) { + let cursor_status = seat.cursor_image_status(); + + if let CursorImageStatus::Surface(wl_surface) = cursor_status { + if let Some(feedback) = + advertised_node_for_surface(&wl_surface, &self.display_handle) + .and_then(|source| dmabuf_feedback(source)) + { + send_dmabuf_feedback_surface_tree( + &wl_surface, + output, + surface_primary_scanout_output, + |surface, _| { + select_dmabuf_feedback( + surface, + render_element_states, + &feedback.render_feedback, + &feedback.scanout_feedback, + ) + }, + ); + } + } + + if let Some(icon) = get_dnd_icon(seat) { + if let Some(feedback) = + advertised_node_for_surface(&icon.surface, &self.display_handle) + .and_then(|source| dmabuf_feedback(source)) + { + send_dmabuf_feedback_surface_tree( + &icon.surface, + output, + surface_primary_scanout_output, + |surface, _| { + select_dmabuf_feedback( + surface, + render_element_states, + &feedback.render_feedback, + &feedback.scanout_feedback, + ) + }, + ); + } + } + if let Some(move_grab) = seat.user_data().get::() { if let Some(grab_state) = move_grab.lock().unwrap().as_ref() { for (window, _) in grab_state.element().windows() {