1
0
Fork 0
forked from wry/wry

wl_surface: move dnd logic to separate module

This commit is contained in:
Julian Orth 2024-07-10 19:43:54 +02:00
parent f871ea1d67
commit af15e20e9b
6 changed files with 93 additions and 45 deletions

View file

@ -370,14 +370,7 @@ impl dyn GfxFramebuffer {
}
}
if let Some(dnd_icon) = seat.dnd_icon() {
let extents = dnd_icon.extents.get().move_(
x.round_down() + dnd_icon.buf_x.get(),
y.round_down() + dnd_icon.buf_y.get(),
);
if extents.intersects(&rect) {
let (x, y) = rect.translate(extents.x1(), extents.y1());
renderer.render_surface(&dnd_icon, x, y, None);
}
dnd_icon.render(&mut renderer, &rect, x.round_down(), y.round_down());
}
if render_cursor {
let cursor_user_group = seat.cursor_group();