mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-05 13:29:47 -05:00
dnd: ensure internal dnd handlers are unlinked on xwm_destroy()
Fixes #3925
This commit is contained in:
parent
c6dd5e3c2e
commit
be3d2b74cf
3 changed files with 18 additions and 0 deletions
|
|
@ -315,6 +315,7 @@ static void seat_handle_drag_source_destroy(struct wl_listener *listener,
|
|||
wl_container_of(listener, xwm, seat_drag_source_destroy);
|
||||
|
||||
wl_list_remove(&xwm->seat_drag_source_destroy.link);
|
||||
wl_list_init(&xwm->seat_drag_source_destroy.link);
|
||||
xwm->drag_focus = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -337,3 +338,15 @@ void xwm_seat_handle_start_drag(struct wlr_xwm *xwm, struct wlr_drag *drag) {
|
|||
xwm->seat_drag_source_destroy.notify = seat_handle_drag_source_destroy;
|
||||
}
|
||||
}
|
||||
|
||||
void xwm_seat_unlink_drag_handlers(struct wlr_xwm *xwm) {
|
||||
wl_list_remove(&xwm->seat_drag_source_destroy.link);
|
||||
|
||||
if (!xwm->drag) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(&xwm->seat_drag_focus.link);
|
||||
wl_list_remove(&xwm->seat_drag_motion.link);
|
||||
wl_list_remove(&xwm->seat_drag_drop.link);
|
||||
wl_list_remove(&xwm->seat_drag_destroy.link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue