From 8e65e1d6235f5c3500a0d5f1f2ba3b21f6ce849a Mon Sep 17 00:00:00 2001 From: Capybara121 <97924274+Capybara121@users.noreply.github.com> Date: Tue, 24 Sep 2024 10:46:44 +1200 Subject: [PATCH] bar_item_set_position now removes the item from any popups --- src/bar_item.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bar_item.c b/src/bar_item.c index 1968ea4..69f2db8 100644 --- a/src/bar_item.c +++ b/src/bar_item.c @@ -473,6 +473,10 @@ bool bar_item_set_position(struct bar_item* bar_item, char* position) { return false; } + if (bar_item->parent != NULL){ + popup_remove_item(&bar_item->parent->popup,bar_item); + } + bar_item->position = position[0]; if (position[0] != POSITION_POPUP) bar_item->align = position[0];