unlink some destroy listeners

Recently wlroots was updated to assert that signals do not have listeners
attached on destroy.

This is just a preliminar work to fix dwl. At the moment dwl will trigger the
assertions at exit.

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4918
This commit is contained in:
Leonardo Hernández Hernández 2025-01-16 19:02:02 -06:00
parent 26504f9a6f
commit 0925fe956a
No known key found for this signature in database
GPG key ID: E538897EE11B9624

2
dwl.c
View file

@ -1176,6 +1176,7 @@ destroydragicon(struct wl_listener *listener, void *data)
/* Focus enter isn't sent during drag, so refocus the focused node. */ /* Focus enter isn't sent during drag, so refocus the focused node. */
focusclient(focustop(selmon), 1); focusclient(focustop(selmon), 1);
motionnotify(0, NULL, 0, 0, 0, 0); motionnotify(0, NULL, 0, 0, 0, 0);
wl_list_remove(&listener->link);
} }
void void
@ -1184,6 +1185,7 @@ destroyidleinhibitor(struct wl_listener *listener, void *data)
/* `data` is the wlr_surface of the idle inhibitor being destroyed, /* `data` is the wlr_surface of the idle inhibitor being destroyed,
* at this point the idle inhibitor is still in the list of the manager */ * at this point the idle inhibitor is still in the list of the manager */
checkidleinhibitor(wlr_surface_get_root_surface(data)); checkidleinhibitor(wlr_surface_get_root_surface(data));
wl_list_remove(&listener->link);
} }
void void