mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-22 19:33:03 +00:00
wake the bar if a new display is added (#422)
This commit is contained in:
parent
0acca7caae
commit
5a63ad8e7a
1 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue