disable popups when bar is hidden (closes #134)

This commit is contained in:
Felix Kratz 2021-12-22 22:59:15 +01:00
parent d2bcbfe66b
commit 83afb1b028

View file

@ -3,6 +3,7 @@
#include "bar.h"
#include "bar_item.h"
#include "misc/helpers.h"
#include "popup.h"
#include <_types/_uint32_t.h>
#include <string.h>
@ -193,6 +194,12 @@ bool bar_manager_set_hidden(struct bar_manager *bar_manager, uint32_t adid, bool
bar_manager->any_bar_hidden |= hidden;
}
}
if (hidden) {
for (int i = 0; i < bar_manager->bar_item_count; i++) {
popup_set_drawing(&bar_manager->bar_items[i]->popup, false);
}
}
return true;
}