]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/action.c: remove assumption about MoveToOutput direction being valid
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 6 Mar 2024 03:46:40 +0000 (04:46 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 6 Mar 2024 18:34:56 +0000 (18:34 +0000)
src/action.c

index 8e152c796b7a5aededb4e362818a84064063b004..1f8289e01215051f8084fc9aa540252a96bbab8b 100644 (file)
@@ -926,7 +926,6 @@ actions_run(struct view *activator, struct server *server,
                        if (output_name) {
                                target = output_from_name(view->server, output_name);
                        } else {
-                               /* Config parsing makes sure that direction is a valid direction */
                                enum view_edge edge = action_get_int(action, "direction", 0);
                                bool wrap = action_get_bool(action, "wrap", false);
                                target = view_get_adjacent_output(view, edge, wrap);
@@ -934,7 +933,8 @@ actions_run(struct view *activator, struct server *server,
                        if (!target) {
                                /*
                                 * Most likely because we're already on the
-                                * output furthest in the requested direction.
+                                * output furthest in the requested direction
+                                * or the output or direction was invalid.
                                 */
                                wlr_log(WLR_DEBUG, "Invalid output");
                                break;