It's currently unused, and there's actually no way to use it correctly.

The caller cannot free the menu that was created:
- the function only returns the window, not the menu
- there's no public API to destroy a menu object

Signed-off-by: Dima Ryazanov <d...@gmail.com>
---
 clients/window.c | 15 ---------------
 clients/window.h |  5 -----
 2 files changed, 20 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index 84d585e..c3c8c9e 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -5470,21 +5470,6 @@ create_menu(struct display *display,
        return menu;
 }
 
-struct window *
-window_create_menu(struct display *display,
-                  struct input *input, uint32_t time,
-                  menu_func_t func, const char **entries, int count,
-                  void *user_data)
-{
-       struct menu *menu;
-       menu = create_menu(display, input, time, func, entries, count, 
user_data);
-
-       if (menu == NULL)
-               return NULL;
-
-       return menu->window;
-}
-
 static struct zxdg_positioner_v6 *
 create_simple_positioner(struct display *display,
                         int x, int y)
diff --git a/clients/window.h b/clients/window.h
index 1ad3b4f..1ec9eac 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -322,11 +322,6 @@ window_has_focus(struct window *window);
 
 typedef void (*menu_func_t)(void *data, struct input *input, int index);
 
-struct window *
-window_create_menu(struct display *display,
-                  struct input *input, uint32_t time,
-                  menu_func_t func, const char **entries, int count,
-                  void *user_data);
 void
 window_show_menu(struct display *display,
                 struct input *input, uint32_t time, struct window *parent,
-- 
2.9.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to