From e31c55c32c610b6366bde8934be72a468173cf09 Mon Sep 17 00:00:00 2001 From: Felix Kratz Date: Tue, 2 Nov 2021 10:59:09 +0100 Subject: [PATCH] fix much too agressive window reload --- src/bar_manager.c | 1 - src/event.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bar_manager.c b/src/bar_manager.c index 3728d93..58ac3d4 100644 --- a/src/bar_manager.c +++ b/src/bar_manager.c @@ -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) { - bar_manager_display_changed(&g_bar_manager); bar_manager_custom_events_trigger(bar_manager, COMMAND_SUBSCRIBE_DISPLAY_CHANGE); } diff --git a/src/event.c b/src/event.c index 9246974..9febd63 100644 --- a/src/event.c +++ b/src/event.c @@ -47,24 +47,28 @@ static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_CHANGED) { static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_ADDED) { debug("%s\n", __FUNCTION__); bar_manager_handle_display_change(&g_bar_manager); + bar_manager_display_changed(&g_bar_manager); return EVENT_SUCCESS; } static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_REMOVED) { debug("%s\n", __FUNCTION__); bar_manager_handle_display_change(&g_bar_manager); + bar_manager_display_changed(&g_bar_manager); return EVENT_SUCCESS; } static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_MOVED) { debug("%s\n", __FUNCTION__); bar_manager_handle_display_change(&g_bar_manager); + bar_manager_display_changed(&g_bar_manager); return EVENT_SUCCESS; } static EVENT_CALLBACK(EVENT_HANDLER_DISPLAY_RESIZED) { debug("%s\n", __FUNCTION__); bar_manager_handle_display_change(&g_bar_manager); + bar_manager_display_changed(&g_bar_manager); return EVENT_SUCCESS; }