wayland: implement xdg-toplevel-drag
This commit is contained in:
parent
e665a18242
commit
364872258a
21 changed files with 535 additions and 70 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue