aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/floating.c3
-rw-r--r--sway/commands/fullscreen.c3
-rw-r--r--sway/commands/move.c6
-rw-r--r--sway/commands/rename.c3
4 files changed, 9 insertions, 6 deletions
diff --git a/sway/commands/floating.c b/sway/commands/floating.c
index 31de5ec3..c9467ef0 100644
--- a/sway/commands/floating.c
+++ b/sway/commands/floating.c
@@ -8,6 +8,7 @@
8#include "sway/tree/container.h" 8#include "sway/tree/container.h"
9#include "sway/tree/layout.h" 9#include "sway/tree/layout.h"
10#include "sway/tree/view.h" 10#include "sway/tree/view.h"
11#include "sway/tree/workspace.h"
11#include "list.h" 12#include "list.h"
12 13
13struct cmd_results *cmd_floating(int argc, char **argv) { 14struct cmd_results *cmd_floating(int argc, char **argv) {
@@ -24,7 +25,7 @@ struct cmd_results *cmd_floating(int argc, char **argv) {
24 if (container->type == C_WORKSPACE) { 25 if (container->type == C_WORKSPACE) {
25 // Wrap the workspace's children in a container so we can float it 26 // Wrap the workspace's children in a container so we can float it
26 struct sway_container *workspace = container; 27 struct sway_container *workspace = container;
27 container = container_wrap_children(container); 28 container = workspace_wrap_children(container);
28 workspace->layout = L_HORIZ; 29 workspace->layout = L_HORIZ;
29 seat_set_focus(config->handler_context.seat, container); 30 seat_set_focus(config->handler_context.seat, container);
30 } 31 }
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c
index 5ad06e40..a0661200 100644
--- a/sway/commands/fullscreen.c
+++ b/sway/commands/fullscreen.c
@@ -4,6 +4,7 @@
4#include "sway/tree/arrange.h" 4#include "sway/tree/arrange.h"
5#include "sway/tree/container.h" 5#include "sway/tree/container.h"
6#include "sway/tree/view.h" 6#include "sway/tree/view.h"
7#include "sway/tree/workspace.h"
7#include "sway/tree/layout.h" 8#include "sway/tree/layout.h"
8#include "util.h" 9#include "util.h"
9 10
@@ -21,7 +22,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
21 if (container->type == C_WORKSPACE) { 22 if (container->type == C_WORKSPACE) {
22 // Wrap the workspace's children in a container so we can fullscreen it 23 // Wrap the workspace's children in a container so we can fullscreen it
23 struct sway_container *workspace = container; 24 struct sway_container *workspace = container;
24 container = container_wrap_children(container); 25 container = workspace_wrap_children(container);
25 workspace->layout = L_HORIZ; 26 workspace->layout = L_HORIZ;
26 seat_set_focus(config->handler_context.seat, container); 27 seat_set_focus(config->handler_context.seat, container);
27 } 28 }
diff --git a/sway/commands/move.c b/sway/commands/move.c
index de6b1b0a..acdc50b5 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -64,7 +64,7 @@ static struct cmd_results *cmd_move_container(struct sway_container *current,
64 return cmd_results_new(CMD_FAILURE, "move", 64 return cmd_results_new(CMD_FAILURE, "move",
65 "Can't move an empty workspace"); 65 "Can't move an empty workspace");
66 } 66 }
67 current = container_wrap_children(current); 67 current = workspace_wrap_children(current);
68 } else if (current->type != C_CONTAINER && current->type != C_VIEW) { 68 } else if (current->type != C_CONTAINER && current->type != C_VIEW) {
69 return cmd_results_new(CMD_FAILURE, "move", 69 return cmd_results_new(CMD_FAILURE, "move",
70 "Can only move containers and views."); 70 "Can only move containers and views.");
@@ -245,7 +245,7 @@ static void workspace_move_to_output(struct sway_container *workspace,
245 // Try to remove an empty workspace from the destination output. 245 // Try to remove an empty workspace from the destination output.
246 container_reap_empty_recursive(new_output_focus); 246 container_reap_empty_recursive(new_output_focus);
247 247
248 container_sort_workspaces(output); 248 output_sort_workspaces(output);
249 seat_set_focus(seat, output); 249 seat_set_focus(seat, output);
250 workspace_output_raise_priority(workspace, old_output, output); 250 workspace_output_raise_priority(workspace, old_output, output);
251 ipc_event_workspace(NULL, workspace, "move"); 251 ipc_event_workspace(NULL, workspace, "move");
@@ -437,7 +437,7 @@ static struct cmd_results *move_to_scratchpad(struct sway_container *con) {
437 if (con->type == C_WORKSPACE) { 437 if (con->type == C_WORKSPACE) {
438 // Wrap the workspace's children in a container 438 // Wrap the workspace's children in a container
439 struct sway_container *workspace = con; 439 struct sway_container *workspace = con;
440 con = container_wrap_children(con); 440 con = workspace_wrap_children(con);
441 workspace->layout = L_HORIZ; 441 workspace->layout = L_HORIZ;
442 } 442 }
443 443
diff --git a/sway/commands/rename.c b/sway/commands/rename.c
index c6952bbb..c69bbdac 100644
--- a/sway/commands/rename.c
+++ b/sway/commands/rename.c
@@ -6,6 +6,7 @@
6#include "sway/commands.h" 6#include "sway/commands.h"
7#include "sway/config.h" 7#include "sway/config.h"
8#include "sway/ipc-server.h" 8#include "sway/ipc-server.h"
9#include "sway/output.h"
9#include "sway/tree/container.h" 10#include "sway/tree/container.h"
10#include "sway/tree/workspace.h" 11#include "sway/tree/workspace.h"
11 12
@@ -82,7 +83,7 @@ struct cmd_results *cmd_rename(int argc, char **argv) {
82 free(workspace->name); 83 free(workspace->name);
83 workspace->name = new_name; 84 workspace->name = new_name;
84 85
85 container_sort_workspaces(workspace->parent); 86 output_sort_workspaces(workspace->parent);
86 ipc_event_workspace(NULL, workspace, "rename"); 87 ipc_event_workspace(NULL, workspace, "rename");
87 88
88 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 89 return cmd_results_new(CMD_SUCCESS, NULL, NULL);