1
0
Fork 0
forked from wry/wry

wayland: implement xdg-toplevel-drag

This commit is contained in:
Julian Orth 2024-03-02 04:57:20 +01:00
parent e665a18242
commit 364872258a
21 changed files with 535 additions and 70 deletions

View file

@ -254,6 +254,17 @@ impl dyn GfxFramebuffer {
let seats = state.globals.lock_seats();
for seat in seats.values() {
let (mut x, mut y) = seat.get_position();
if let Some(drag) = seat.toplevel_drag() {
if let Some(tl) = drag.toplevel.get() {
if tl.xdg.surface.buffer.get().is_some() {
let (x, y) = rect.translate(
x.round_down() - drag.x_off.get(),
y.round_down() - drag.y_off.get(),
);
renderer.render_xdg_surface(&tl.xdg, x, y, None)
}
}
}
if let Some(dnd_icon) = seat.dnd_icon() {
let extents = dnd_icon.extents.get().move_(
x.round_down() + dnd_icon.buf_x.get(),