Skip to content

Commit

Permalink
bar_item_set_position now removes the item from any popups (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
Capybara121 authored Sep 24, 2024
1 parent fe9dce3 commit 44565c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bar_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 44565c8

Please sign in to comment.