From: tokyo4j Date: Sun, 9 Mar 2025 16:56:09 +0000 (+0900) Subject: action: allow only Previous/NextWindow action while window switching X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7cc0c479230ad4262d481d2c8c5432bf5320e20d;p=proto%2Flabwc.git action: allow only Previous/NextWindow action while window switching This commit prevents some actions like SendToDesktop from being executed while window switching, which may mess up our scene-graph. --- diff --git a/src/action.c b/src/action.c index 3b03558c..6f99cc46 100644 --- a/src/action.c +++ b/src/action.c @@ -877,6 +877,14 @@ actions_run(struct view *activator, struct server *server, } wl_list_for_each(action, actions, link) { + if (server->input_mode == LAB_INPUT_STATE_WINDOW_SWITCHER + && action->type != ACTION_TYPE_NEXT_WINDOW + && action->type != ACTION_TYPE_PREVIOUS_WINDOW) { + wlr_log(WLR_INFO, "Only NextWindow or PreviousWindow " + "actions are accepted while window switching."); + continue; + } + wlr_log(WLR_DEBUG, "Handling action %u: %s", action->type, action_names[action->type]);