src/menu: Attach view to menu and use it when executing actions

This fixes #380
This commit is contained in:
Consolatis 2022-06-09 17:10:36 +02:00 committed by Johan Malm
parent ca9226a7a6
commit 5a4c5de332
5 changed files with 63 additions and 30 deletions

View file

@ -121,6 +121,8 @@ show_menu(struct server *server, struct view *view, const char *menu_name)
x = server->seat.cursor->x;
y = server->seat.cursor->y;
}
/* Replaced by next show_menu() or cleaned on view_destroy() */
menu->triggered_by_view = view;
menu_open(menu, x, y);
}