fix much too agressive window reload

This commit is contained in:
Felix Kratz 2021-11-02 10:59:09 +01:00
parent 55f2b57421
commit e31c55c32c
2 changed files with 4 additions and 1 deletions

View file

@ -387,7 +387,6 @@ void bar_manager_handle_space_change(struct bar_manager* bar_manager) {
} }
void bar_manager_handle_display_change(struct bar_manager* bar_manager) { void bar_manager_handle_display_change(struct bar_manager* bar_manager) {
bar_manager_display_changed(&g_bar_manager);
bar_manager_custom_events_trigger(bar_manager, COMMAND_SUBSCRIBE_DISPLAY_CHANGE); bar_manager_custom_events_trigger(bar_manager, COMMAND_SUBSCRIBE_DISPLAY_CHANGE);
} }

View file

@ -47,24 +47,28 @@ static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_CHANGED) {
static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_ADDED) { static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_ADDED) {
debug("%s\n", __FUNCTION__); debug("%s\n", __FUNCTION__);
bar_manager_handle_display_change(&g_bar_manager); bar_manager_handle_display_change(&g_bar_manager);
bar_manager_display_changed(&g_bar_manager);
return EVENT_SUCCESS; return EVENT_SUCCESS;
} }
static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_REMOVED) { static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_REMOVED) {
debug("%s\n", __FUNCTION__); debug("%s\n", __FUNCTION__);
bar_manager_handle_display_change(&g_bar_manager); bar_manager_handle_display_change(&g_bar_manager);
bar_manager_display_changed(&g_bar_manager);
return EVENT_SUCCESS; return EVENT_SUCCESS;
} }
static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_MOVED) { static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_MOVED) {
debug("%s\n", __FUNCTION__); debug("%s\n", __FUNCTION__);
bar_manager_handle_display_change(&g_bar_manager); bar_manager_handle_display_change(&g_bar_manager);
bar_manager_display_changed(&g_bar_manager);
return EVENT_SUCCESS; return EVENT_SUCCESS;
} }
static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_RESIZED) { static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_RESIZED) {
debug("%s\n", __FUNCTION__); debug("%s\n", __FUNCTION__);
bar_manager_handle_display_change(&g_bar_manager); bar_manager_handle_display_change(&g_bar_manager);
bar_manager_display_changed(&g_bar_manager);
return EVENT_SUCCESS; return EVENT_SUCCESS;
} }