From: tokyo4j Date: Sat, 28 Dec 2024 08:03:26 +0000 (+0900) Subject: Don't open menu or start window switching while other server interaction X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=66a3beb98b61645c3ca0a3dab914514d64976cfc;p=proto%2Flabwc.git Don't open menu or start window switching while other server interaction This should make the transition of the server state more predictable and prevent potential bugs. --- diff --git a/src/action.c b/src/action.c index 9396a4b1..b95dd9df 100644 --- a/src/action.c +++ b/src/action.c @@ -800,6 +800,10 @@ shift_is_pressed(struct server *server) static void start_window_cycling(struct server *server, enum lab_cycle_dir direction) { + if (server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) { + return; + } + /* Remember direction so it can be followed by subsequent key presses */ server->osd_state.initial_direction = direction; server->osd_state.initial_keybind_contained_shift = diff --git a/src/menu/menu.c b/src/menu/menu.c index 6a0f5ce8..91a40178 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -1322,6 +1322,10 @@ menu_close(struct menu *menu) void menu_open_root(struct menu *menu, int x, int y) { + if (menu->server->input_mode != LAB_INPUT_STATE_PASSTHROUGH) { + return; + } + assert(menu); if (menu->server->menu_current) { menu_close(menu->server->menu_current);