mirror of
https://github.com/labwc/labwc.git
synced 2026-03-04 01:40:39 -05:00
src/action.c: remove assumption about MoveToOutput direction being valid
This commit is contained in:
parent
983ca66d07
commit
1b9176c427
1 changed files with 2 additions and 2 deletions
|
|
@ -926,7 +926,6 @@ actions_run(struct view *activator, struct server *server,
|
||||||
if (output_name) {
|
if (output_name) {
|
||||||
target = output_from_name(view->server, output_name);
|
target = output_from_name(view->server, output_name);
|
||||||
} else {
|
} else {
|
||||||
/* Config parsing makes sure that direction is a valid direction */
|
|
||||||
enum view_edge edge = action_get_int(action, "direction", 0);
|
enum view_edge edge = action_get_int(action, "direction", 0);
|
||||||
bool wrap = action_get_bool(action, "wrap", false);
|
bool wrap = action_get_bool(action, "wrap", false);
|
||||||
target = view_get_adjacent_output(view, edge, wrap);
|
target = view_get_adjacent_output(view, edge, wrap);
|
||||||
|
|
@ -934,7 +933,8 @@ actions_run(struct view *activator, struct server *server,
|
||||||
if (!target) {
|
if (!target) {
|
||||||
/*
|
/*
|
||||||
* Most likely because we're already on the
|
* 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");
|
wlr_log(WLR_DEBUG, "Invalid output");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue