[PATCH weston 4/6] window: Call the menu callback even if the menu was dismissed
Dima Ryazanov
dima at gmail.com
Mon Dec 5 03:36:33 UTC 2016
Desktop shell will need to know when to clean up menu-related resources.
Other clients might find it useful, too.
Signed-off-by: Dima Ryazanov <dima at gmail.com>
---
clients/window.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/clients/window.c b/clients/window.c
index f49ce72..12884f4 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -5359,6 +5359,7 @@ menu_touch_up_handler(struct widget *widget,
{
struct menu *menu = data;
+ menu->func(menu->user_data, input, -1);
input_ungrab(input);
menu_destroy(menu);
}
@@ -5419,6 +5420,7 @@ xdg_popup_handle_popup_done(void *data, struct zxdg_popup_v6 *xdg_popup)
struct window *window = data;
struct menu *menu = window->main_surface->widget->user_data;
+ menu->func(menu->user_data, menu->input, -1);
input_ungrab(menu->input);
menu_destroy(menu);
}
--
2.9.3
More information about the wayland-devel
mailing list