aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 17:06:29 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 17:06:29 -0400
commiteca029f218fbb54ddf7316845be5d296e834358e (patch)
tree76bf346c980ad94c68797cefbd2ec4a9302dd53f /sway/commands
parentrename container functions (diff)
downloadsway-eca029f218fbb54ddf7316845be5d296e834358e.tar.gz
sway-eca029f218fbb54ddf7316845be5d296e834358e.tar.zst
sway-eca029f218fbb54ddf7316845be5d296e834358e.zip
more renaming things
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/layout.c16
-rw-r--r--sway/commands/reload.c2
-rw-r--r--sway/commands/workspace.c6
3 files changed, 12 insertions, 12 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index e10334e2..e9cfeb8f 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -26,10 +26,10 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
26 // TODO: stacks and tabs 26 // TODO: stacks and tabs
27 27
28 if (strcasecmp(argv[0], "default") == 0) { 28 if (strcasecmp(argv[0], "default") == 0) {
29 swayc_change_layout(parent, parent->prev_layout); 29 container_set_layout(parent, parent->prev_layout);
30 if (parent->layout == L_NONE) { 30 if (parent->layout == L_NONE) {
31 struct sway_container *output = sway_container_parent(parent, C_OUTPUT); 31 struct sway_container *output = container_parent(parent, C_OUTPUT);
32 swayc_change_layout(parent, default_layout(output)); 32 container_set_layout(parent, container_get_default_layout(output));
33 } 33 }
34 } else { 34 } else {
35 if (parent->layout != L_TABBED && parent->layout != L_STACKED) { 35 if (parent->layout != L_TABBED && parent->layout != L_STACKED) {
@@ -37,20 +37,20 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
37 } 37 }
38 38
39 if (strcasecmp(argv[0], "splith") == 0) { 39 if (strcasecmp(argv[0], "splith") == 0) {
40 swayc_change_layout(parent, L_HORIZ); 40 container_set_layout(parent, L_HORIZ);
41 } else if (strcasecmp(argv[0], "splitv") == 0) { 41 } else if (strcasecmp(argv[0], "splitv") == 0) {
42 swayc_change_layout(parent, L_VERT); 42 container_set_layout(parent, L_VERT);
43 } else if (strcasecmp(argv[0], "toggle") == 0 && argc == 2 && strcasecmp(argv[1], "split") == 0) { 43 } else if (strcasecmp(argv[0], "toggle") == 0 && argc == 2 && strcasecmp(argv[1], "split") == 0) {
44 if (parent->layout == L_HORIZ && (parent->workspace_layout == L_NONE 44 if (parent->layout == L_HORIZ && (parent->workspace_layout == L_NONE
45 || parent->workspace_layout == L_HORIZ)) { 45 || parent->workspace_layout == L_HORIZ)) {
46 swayc_change_layout(parent, L_VERT); 46 container_set_layout(parent, L_VERT);
47 } else { 47 } else {
48 swayc_change_layout(parent, L_HORIZ); 48 container_set_layout(parent, L_HORIZ);
49 } 49 }
50 } 50 }
51 } 51 }
52 52
53 arrange_windows(parent, parent->width, parent->height); 53 container_arrange_windows(parent, parent->width, parent->height);
54 54
55 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 55 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
56} 56}
diff --git a/sway/commands/reload.c b/sway/commands/reload.c
index 8cef789b..83ecd75b 100644
--- a/sway/commands/reload.c
+++ b/sway/commands/reload.c
@@ -13,6 +13,6 @@ struct cmd_results *cmd_reload(int argc, char **argv) {
13 13
14 /* load_swaybars(); -- for when it's implemented */ 14 /* load_swaybars(); -- for when it's implemented */
15 15
16 arrange_windows(&root_container, -1, -1); 16 container_arrange_windows(&root_container, -1, -1);
17 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 17 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
18} 18}
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 8b7139a9..8f39e5fc 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -23,9 +23,9 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
23 if (current_container->type == C_WORKSPACE) { 23 if (current_container->type == C_WORKSPACE) {
24 old_workspace = current_container; 24 old_workspace = current_container;
25 } else { 25 } else {
26 old_workspace = sway_container_parent(current_container, C_WORKSPACE); 26 old_workspace = container_parent(current_container, C_WORKSPACE);
27 } 27 }
28 old_output = sway_container_parent(current_container, C_OUTPUT); 28 old_output = container_parent(current_container, C_OUTPUT);
29 } 29 }
30 30
31 for (int i = 0; i < argc; ++i) { 31 for (int i = 0; i < argc; ++i) {
@@ -92,7 +92,7 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
92 workspace_switch(ws); 92 workspace_switch(ws);
93 current_container = 93 current_container =
94 sway_seat_get_focus(config->handler_context.seat); 94 sway_seat_get_focus(config->handler_context.seat);
95 struct sway_container *new_output = sway_container_parent(current_container, C_OUTPUT); 95 struct sway_container *new_output = container_parent(current_container, C_OUTPUT);
96 96
97 if (config->mouse_warping && old_output != new_output) { 97 if (config->mouse_warping && old_output != new_output) {
98 // TODO: Warp mouse 98 // TODO: Warp mouse