wake the bar if a new display is added (#422)

This commit is contained in:
Felix Kratz 2023-10-13 20:01:58 +02:00
parent 0acca7caae
commit 5a63ad8e7a

View file

@ -754,6 +754,7 @@ void bar_manager_display_removed(struct bar_manager* bar_manager, uint32_t did)
}
void bar_manager_display_added(struct bar_manager* bar_manager, uint32_t did) {
if (bar_manager->sleeps) bar_manager_handle_system_woke(bar_manager);
bar_manager_display_changed(bar_manager);
}
@ -971,12 +972,14 @@ void bar_manager_handle_system_will_sleep(struct bar_manager* bar_manager) {
}
void bar_manager_handle_system_woke(struct bar_manager* bar_manager) {
bar_manager->sleeps = false;
animator_renew_display_link(&bar_manager->animator);
bar_manager_custom_events_trigger(bar_manager,
COMMAND_SUBSCRIBE_SYSTEM_WOKE,
NULL );
if (bar_manager->sleeps) {
bar_manager->sleeps = false;
bar_manager_custom_events_trigger(bar_manager,
COMMAND_SUBSCRIBE_SYSTEM_WOKE,
NULL );
}
animator_renew_display_link(&bar_manager->animator);
bar_manager_refresh(bar_manager, true);
bar_manager_handle_space_change(bar_manager, true);
}