send kill signal to all event ports on bar_manager_destroy

This commit is contained in:
Felix Kratz 2023-11-12 21:36:30 +01:00
parent f3eafac1a3
commit 0ddb8ee229

View file

@ -1022,6 +1022,13 @@ void bar_manager_handle_notification(struct bar_manager* bar_manager, struct not
}
void bar_manager_destroy(struct bar_manager* bar_manager) {
for (int i = 0; i < bar_manager->bar_item_count; i++) {
struct bar_item* bar_item = bar_manager->bar_items[i];
if (bar_item->event_port) {
mach_send_message(bar_item->event_port, "k", 2, false);
}
}
animator_destroy(&bar_manager->animator);
while (bar_manager->bar_item_count > 0) {