|
|
@ -138,9 +138,6 @@ static void drag_destroy(struct wlr_drag *drag) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// We issue destroy after ending the grab to allow focus changes.
|
|
|
|
|
|
|
|
wlr_signal_emit_safe(&drag->events.destroy, drag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (drag->started) {
|
|
|
|
if (drag->started) {
|
|
|
|
drag_set_focus(drag, NULL, 0, 0);
|
|
|
|
drag_set_focus(drag, NULL, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
@ -148,6 +145,13 @@ static void drag_destroy(struct wlr_drag *drag) {
|
|
|
|
drag->seat->drag = NULL;
|
|
|
|
drag->seat->drag = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We issue destroy after ending the grab to allow focus changes.
|
|
|
|
|
|
|
|
// Furthermore, we wait until after clearing the drag focus in order
|
|
|
|
|
|
|
|
// to ensure that the wl_data_device.leave is sent before emitting the
|
|
|
|
|
|
|
|
// signal. This allows e.g. wl_pointer.enter to be sent in the destroy
|
|
|
|
|
|
|
|
// signal handler.
|
|
|
|
|
|
|
|
wlr_signal_emit_safe(&drag->events.destroy, drag);
|
|
|
|
|
|
|
|
|
|
|
|
if (drag->source) {
|
|
|
|
if (drag->source) {
|
|
|
|
wl_list_remove(&drag->source_destroy.link);
|
|
|
|
wl_list_remove(&drag->source_destroy.link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|