Prevent rare crash due to layering move / resize / menu operations

Fixes #817

Reported-by: @kode54
This commit is contained in:
Consolatis 2023-03-07 22:59:56 +01:00 committed by Johan Malm
parent 43fb969b19
commit 5aa5c12371
2 changed files with 10 additions and 0 deletions

View file

@ -211,6 +211,12 @@ void action_list_free(struct wl_list *action_list)
static void
show_menu(struct server *server, struct view *view, const char *menu_name)
{
if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH
&& server->input_mode != LAB_INPUT_STATE_MENU) {
/* Prevent opening a menu while resizing / moving a view */
return;
}
bool force_menu_top_left = false;
struct menu *menu = menu_get_by_id(menu_name);
if (!menu) {