From 66682facad95aa7bd49fa0041ce98f6fd3e5b198 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Wed, 17 Nov 2021 13:37:59 +0900 Subject: [PATCH] menu: Disallow dragging/resizing of menu windows --- lib/menu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/menu.c b/lib/menu.c index 48e00b89..33a0fb1c 100644 --- a/lib/menu.c +++ b/lib/menu.c @@ -584,9 +584,10 @@ void menu_prepare(struct MenuList * menu, yutani_t * yctx) { menu->closed = 0; /* Create window */ + yutani_window_t * menu_window = yutani_window_create_flags(yctx, width, height, - (menu->flags & MENU_FLAG_BUBBLE) ? YUTANI_WINDOW_FLAG_ALT_ANIMATION : - YUTANI_WINDOW_FLAG_NO_ANIMATION); + ((menu->flags & MENU_FLAG_BUBBLE) ? YUTANI_WINDOW_FLAG_ALT_ANIMATION : + YUTANI_WINDOW_FLAG_NO_ANIMATION) | YUTANI_WINDOW_FLAG_DISALLOW_DRAG | YUTANI_WINDOW_FLAG_DISALLOW_RESIZE); yutani_set_stack(yctx, menu_window, YUTANI_ZORDER_MENU); if (menu->ctx) { reinit_graphics_yutani(menu->ctx, menu_window);