Skip to content

Commit 44565c8

Browse files
authored
bar_item_set_position now removes the item from any popups (#619)
1 parent fe9dce3 commit 44565c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bar_item.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,10 @@ bool bar_item_set_position(struct bar_item* bar_item, char* position) {
473473
return false;
474474
}
475475

476+
if (bar_item->parent != NULL){
477+
popup_remove_item(&bar_item->parent->popup,bar_item);
478+
}
479+
476480
bar_item->position = position[0];
477481
if (position[0] != POSITION_POPUP)
478482
bar_item->align = position[0];

0 commit comments

Comments
 (0)