mirror of
https://github.com/labwc/labwc.git
synced 2026-02-24 01:40:15 -05:00
src/action.c: fix MoveToOutput action by renaming 'name' argument
We were using the argument name 'name' before which is already used by the action itself: `<action name="MoveToOutput" name="HDMI-A-1" />` Change the argument name to "output" which also matches the `FocusOutput` action. Fixes: #1589 Reported-by: @bnason (thanks!)
This commit is contained in:
parent
bcf2d7e091
commit
983ca66d07
2 changed files with 7 additions and 7 deletions
|
|
@ -163,12 +163,12 @@ Actions are used in menus and keyboard/mouse bindings.
|
||||||
to the center of the window. If the given output does not contain
|
to the center of the window. If the given output does not contain
|
||||||
any windows, the cursor is centered on the given output.
|
any windows, the cursor is centered on the given output.
|
||||||
|
|
||||||
*<action name="MoveToOutput" name="HDMI-A-1" direction="value" wrap="no" />*
|
*<action name="MoveToOutput" output="HDMI-A-1" direction="value" wrap="no" />*
|
||||||
Moves active window to other output, unless the window state is
|
Moves active window to other output, unless the window state is
|
||||||
fullscreen.
|
fullscreen.
|
||||||
|
|
||||||
If *name* is specified, the window will be sent directly to the specified
|
If *output* is specified, the window will be sent directly to the specified
|
||||||
output and *direction* is ignored. If *name* is omitted, *direction* may
|
output and *direction* is ignored. If *output* is omitted, *direction* may
|
||||||
be one of "left", "right", "up" or "down" to indicate that the window
|
be one of "left", "right", "up" or "down" to indicate that the window
|
||||||
should be moved to the next output in that direction (if one exists).
|
should be moved to the next output in that direction (if one exists).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ action_arg_from_xml_node(struct action *action, const char *nodename, const char
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_TYPE_MOVE_TO_OUTPUT:
|
case ACTION_TYPE_MOVE_TO_OUTPUT:
|
||||||
if (!strcmp(argument, "name")) {
|
if (!strcmp(argument, "output")) {
|
||||||
action_arg_add_str(action, argument, content);
|
action_arg_add_str(action, argument, content);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
@ -921,10 +921,10 @@ actions_run(struct view *activator, struct server *server,
|
||||||
if (!view) {
|
if (!view) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const char *name = action_get_str(action, "name", NULL);
|
const char *output_name = action_get_str(action, "output", NULL);
|
||||||
struct output *target = NULL;
|
struct output *target = NULL;
|
||||||
if (name) {
|
if (output_name) {
|
||||||
target = output_from_name(view->server, name);
|
target = output_from_name(view->server, output_name);
|
||||||
} else {
|
} else {
|
||||||
/* Config parsing makes sure that direction is a valid direction */
|
/* 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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue