mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-20 06:50:04 +01:00
drag: destroy data source on touch_up
This is in case we drop the drag with no focus, we want to destroy the drag to tell the client the drag was cancelled.
This commit is contained in:
parent
bf9452433c
commit
03b465f324
1 changed files with 4 additions and 0 deletions
|
|
@ -292,6 +292,10 @@ static uint32_t drag_handle_touch_up(struct wlr_seat_touch_grab *grab,
|
|||
|
||||
if (drag->focus_client) {
|
||||
drag_drop(drag, time);
|
||||
} else if (drag->source->impl->dnd_finish) {
|
||||
// This will end the grab and free `drag`
|
||||
wlr_data_source_destroy(drag->source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
drag_destroy(drag);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue