]> git.mdlowis.com Git - proto/labwc.git/commitdiff
menu: allow client-{list-combined,send-to}-menu as submenu of static menu
authortokyo4j <hrak1529@gmail.com>
Wed, 13 Aug 2025 14:52:24 +0000 (23:52 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 13 Aug 2025 19:29:23 +0000 (20:29 +0100)
Also, their labels are changed to "Windows" and "Send to desktop" which
are the same as Openbox.

src/menu/menu.c

index 0232e2d5cd89b431275f70afa05d10185b9b672a..8ceb92b6942f2a22119f765c3c24acca20489163 100644 (file)
@@ -814,13 +814,6 @@ menu_hide_submenu(struct server *server, const char *id)
        }
 }
 
-static void
-init_client_send_to_menu(struct server *server)
-{
-       /* Just create placeholder. Contents will be created when launched */
-       menu_create(server, NULL, "client-send-to-menu", "");
-}
-
 static struct action *
 item_add_action(struct menuitem *item, const char *action_name)
 {
@@ -866,13 +859,6 @@ update_client_send_to_menu(struct server *server)
        menu_create_scene(menu);
 }
 
-static void
-init_client_list_combined_menu(struct server *server)
-{
-       /* Just create placeholder. Contents will be created when launched */
-       menu_create(server, NULL, "client-list-combined-menu", "");
-}
-
 /*
  * This is client-list-combined-menu an internal menu similar to root-menu and
  * client-menu.
@@ -1010,11 +996,14 @@ void
 menu_init(struct server *server)
 {
        wl_list_init(&server->menus);
+
+       /* Just create placeholder. Contents will be created when launched */
+       menu_create(server, NULL, "client-list-combined-menu", _("Windows"));
+       menu_create(server, NULL, "client-send-to-menu", _("Send to desktop"));
+
        parse_xml("menu.xml", server);
        init_rootmenu(server);
        init_windowmenu(server);
-       init_client_list_combined_menu(server);
-       init_client_send_to_menu(server);
        validate(server);
 }