summaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
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/tree/workspace.c
parentrename container functions (diff)
downloadsway-eca029f218fbb54ddf7316845be5d296e834358e.tar.gz
sway-eca029f218fbb54ddf7316845be5d296e834358e.tar.zst
sway-eca029f218fbb54ddf7316845be5d296e834358e.zip
more renaming things
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 32e82845..0fdd9975 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -52,7 +52,7 @@ struct sway_container *workspace_by_number(const char* name) {
52 if (wbnd.len <= 0) { 52 if (wbnd.len <= 0) {
53 return NULL; 53 return NULL;
54 } 54 }
55 return sway_container_find(&root_container, _workspace_by_number, (void *) &wbnd); 55 return container_find(&root_container, _workspace_by_number, (void *) &wbnd);
56} 56}
57 57
58static bool _workspace_by_name(struct sway_container *view, void *data) { 58static bool _workspace_by_name(struct sway_container *view, void *data) {
@@ -65,8 +65,8 @@ struct sway_container *workspace_by_name(const char *name) {
65 struct sway_container *current_workspace = NULL, *current_output = NULL; 65 struct sway_container *current_workspace = NULL, *current_output = NULL;
66 struct sway_container *focus = sway_seat_get_focus(seat); 66 struct sway_container *focus = sway_seat_get_focus(seat);
67 if (focus) { 67 if (focus) {
68 current_workspace = sway_container_parent(focus, C_WORKSPACE); 68 current_workspace = container_parent(focus, C_WORKSPACE);
69 current_output = sway_container_parent(focus, C_OUTPUT); 69 current_output = container_parent(focus, C_OUTPUT);
70 } 70 }
71 if (strcmp(name, "prev") == 0) { 71 if (strcmp(name, "prev") == 0) {
72 return workspace_prev(current_workspace); 72 return workspace_prev(current_workspace);
@@ -79,7 +79,7 @@ struct sway_container *workspace_by_name(const char *name) {
79 } else if (strcmp(name, "current") == 0) { 79 } else if (strcmp(name, "current") == 0) {
80 return current_workspace; 80 return current_workspace;
81 } else { 81 } else {
82 return sway_container_find(&root_container, _workspace_by_name, (void *) name); 82 return container_find(&root_container, _workspace_by_name, (void *) name);
83 } 83 }
84} 84}
85 85
@@ -95,7 +95,7 @@ struct sway_container *workspace_create(const char *name) {
95 for (i = 0; i < e; ++i) { 95 for (i = 0; i < e; ++i) {
96 parent = root_container.children->items[i]; 96 parent = root_container.children->items[i];
97 if (strcmp(parent->name, wso->output) == 0) { 97 if (strcmp(parent->name, wso->output) == 0) {
98 return sway_container_workspace_create(parent, name); 98 return container_workspace_create(parent, name);
99 } 99 }
100 } 100 }
101 break; 101 break;
@@ -105,8 +105,8 @@ struct sway_container *workspace_create(const char *name) {
105 struct sway_seat *seat = input_manager_current_seat(input_manager); 105 struct sway_seat *seat = input_manager_current_seat(input_manager);
106 struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container); 106 struct sway_container *focus = sway_seat_get_focus_inactive(seat, &root_container);
107 parent = focus; 107 parent = focus;
108 parent = sway_container_parent(parent, C_OUTPUT); 108 parent = container_parent(parent, C_OUTPUT);
109 return sway_container_workspace_create(parent, name); 109 return container_workspace_create(parent, name);
110} 110}
111 111
112/** 112/**
@@ -124,7 +124,7 @@ struct sway_container *workspace_output_prev_next_impl(struct sway_container *ou
124 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); 124 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output);
125 struct sway_container *workspace = (focus->type == C_WORKSPACE ? 125 struct sway_container *workspace = (focus->type == C_WORKSPACE ?
126 focus : 126 focus :
127 sway_container_parent(focus, C_WORKSPACE)); 127 container_parent(focus, C_WORKSPACE));
128 128
129 int i; 129 int i;
130 for (i = 0; i < output->children->length; i++) { 130 for (i = 0; i < output->children->length; i++) {
@@ -207,7 +207,7 @@ bool workspace_switch(struct sway_container *workspace) {
207 } 207 }
208 struct sway_container *active_ws = focus; 208 struct sway_container *active_ws = focus;
209 if (active_ws->type != C_WORKSPACE) { 209 if (active_ws->type != C_WORKSPACE) {
210 sway_container_parent(focus, C_WORKSPACE); 210 container_parent(focus, C_WORKSPACE);
211 } 211 }
212 212
213 if (config->auto_back_and_forth 213 if (config->auto_back_and_forth
@@ -236,7 +236,7 @@ bool workspace_switch(struct sway_container *workspace) {
236 next = workspace; 236 next = workspace;
237 } 237 }
238 sway_seat_set_focus(seat, next); 238 sway_seat_set_focus(seat, next);
239 struct sway_container *output = sway_container_parent(workspace, C_OUTPUT); 239 struct sway_container *output = container_parent(workspace, C_OUTPUT);
240 arrange_windows(output, -1, -1); 240 container_arrange_windows(output, -1, -1);
241 return true; 241 return true;
242} 242}