dnd: correct handling of cursor buffer offset

This commit is contained in:
Christian Meissl 2024-09-13 19:22:57 +02:00 committed by Victoria Brekenfeld
parent bd04d68106
commit afdb656778
4 changed files with 130 additions and 27 deletions

View file

@ -540,11 +540,16 @@ pub fn render_window_to_buffer(
);
}
if let Some(wl_surface) = get_dnd_icon(&seat) {
if let Some(dnd_icon) = get_dnd_icon(&seat) {
elements.extend(
cursor::draw_dnd_icon(renderer, &wl_surface, location.to_i32_round(), 1.0)
.into_iter()
.map(WindowCaptureElement::from),
cursor::draw_dnd_icon(
renderer,
&dnd_icon.surface,
(location + dnd_icon.offset.to_f64()).to_i32_round(),
1.0,
)
.into_iter()
.map(WindowCaptureElement::from),
);
}
}