mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-22 19:33:03 +00:00
send kill signal to all event ports on bar_manager_destroy
This commit is contained in:
parent
f3eafac1a3
commit
0ddb8ee229
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue