menu: lazily generate menu scenes

This removes the need to call update_client_list_combined_menu()
and update_client_send_to_menu() every time a root menu is opened.

This commit also fixed the incorrect menu position with following
configuration:
  <menu id="foo" label="foo">
    <item label="aaaaaa"/>
    <item label="bbbbbb"/>
  </menu>
  <menu id="root-menu">
    <menu id="foo" />
    <menu id="foo" />
  </menu>
This commit is contained in:
tokyo4j 2025-03-10 00:00:39 +09:00 committed by Hiroaki Yamamoto
parent 514f1d4fc4
commit 12f95543f0
3 changed files with 50 additions and 85 deletions

View file

@ -127,7 +127,4 @@ void menu_close_root(struct server *server);
/* menu_reconfigure - reload theme and content */
void menu_reconfigure(struct server *server);
void update_client_list_combined_menu(struct server *server);
void update_client_send_to_menu(struct server *server);
#endif /* LABWC_MENU_H */