aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 0e81e6a7..06172ac4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -717,14 +717,11 @@ static struct cmd_results *cmd_move(int argc, char **argv) {
return cmd_results_new(CMD_FAILURE, "move", "Can only move containers and views.");
}
- char *ws_name = strdup(argv[3]);
- strip_quotes(ws_name);
+ const char *ws_name = argv[3];
swayc_t *ws;
if (argc == 5 && strcasecmp(ws_name, "number") == 0) {
// move "container to workspace number x"
- free(ws_name);
- ws_name = strdup(argv[4]);
- strip_quotes(ws_name);
+ ws_name = argv[4];
ws = workspace_by_number(ws_name);
} else {
ws = workspace_by_name(ws_name);
@@ -733,7 +730,6 @@ static struct cmd_results *cmd_move(int argc, char **argv) {
if (ws == NULL) {
ws = workspace_create(ws_name);
}
- free(ws_name);
move_container_to(view, get_focused_container(ws));
} else if (strcasecmp(argv[1], "to") == 0 && strcasecmp(argv[2], "output") == 0) {
// move container to output x