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.
This commit is contained in:
tokyo4j 2025-03-10 01:56:09 +09:00 committed by Johan Malm
parent 270b45da88
commit 7cc0c47923

View file

@ -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]);