mirror of
https://github.com/labwc/labwc.git
synced 2026-02-11 04:27:51 -05:00
menu: fix breakage caused by f857aea8
This commit is contained in:
parent
0e57c65393
commit
9a9cd609f6
3 changed files with 29 additions and 17 deletions
|
|
@ -231,16 +231,19 @@ menu_finish(struct menu *menu)
|
|||
void
|
||||
menu_move(struct menu *menu, int x, int y)
|
||||
{
|
||||
menu->x = x;
|
||||
menu->y = y;
|
||||
menu->box.x = x;
|
||||
menu->box.y = y;
|
||||
|
||||
int offset = 0;
|
||||
struct menuitem *menuitem;
|
||||
wl_list_for_each_reverse (menuitem, &menu->menuitems, link) {
|
||||
menuitem->box.x = menu->x;
|
||||
menuitem->box.y = menu->y + offset;
|
||||
menuitem->box.x = menu->box.x;
|
||||
menuitem->box.y = menu->box.y + offset;
|
||||
offset += menuitem->box.height;
|
||||
}
|
||||
|
||||
menu->box.width = MENUWIDTH;
|
||||
menu->box.height = offset;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue