aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index d6fd7c70..8077de2e 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -176,7 +176,7 @@ static bool _workspace_by_name(struct sway_container *view, void *data) {
176struct sway_container *workspace_by_name(const char *name) { 176struct sway_container *workspace_by_name(const char *name) {
177 struct sway_seat *seat = input_manager_current_seat(input_manager); 177 struct sway_seat *seat = input_manager_current_seat(input_manager);
178 struct sway_container *current_workspace = NULL, *current_output = NULL; 178 struct sway_container *current_workspace = NULL, *current_output = NULL;
179 struct sway_container *focus = sway_seat_get_focus(seat); 179 struct sway_container *focus = seat_get_focus(seat);
180 if (focus) { 180 if (focus) {
181 current_workspace = container_parent(focus, C_WORKSPACE); 181 current_workspace = container_parent(focus, C_WORKSPACE);
182 current_output = container_parent(focus, C_OUTPUT); 182 current_output = container_parent(focus, C_OUTPUT);
@@ -218,7 +218,7 @@ struct sway_container *workspace_create(const char *name) {
218 // Otherwise create a new one 218 // Otherwise create a new one
219 struct sway_seat *seat = input_manager_current_seat(input_manager); 219 struct sway_seat *seat = input_manager_current_seat(input_manager);
220 struct sway_container *focus = 220 struct sway_container *focus =
221 sway_seat_get_focus_inactive(seat, &root_container); 221 seat_get_focus_inactive(seat, &root_container);
222 parent = focus; 222 parent = focus;
223 parent = container_parent(parent, C_OUTPUT); 223 parent = container_parent(parent, C_OUTPUT);
224 struct sway_container *new_ws = container_workspace_create(parent, name); 224 struct sway_container *new_ws = container_workspace_create(parent, name);
@@ -278,7 +278,7 @@ struct sway_container *workspace_output_prev_next_impl(
278 } 278 }
279 279
280 struct sway_seat *seat = input_manager_current_seat(input_manager); 280 struct sway_seat *seat = input_manager_current_seat(input_manager);
281 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); 281 struct sway_container *focus = seat_get_focus_inactive(seat, output);
282 struct sway_container *workspace = (focus->type == C_WORKSPACE ? 282 struct sway_container *workspace = (focus->type == C_WORKSPACE ?
283 focus : 283 focus :
284 container_parent(focus, C_WORKSPACE)); 284 container_parent(focus, C_WORKSPACE));
@@ -363,13 +363,13 @@ bool workspace_switch(struct sway_container *workspace) {
363 } 363 }
364 struct sway_seat *seat = input_manager_current_seat(input_manager); 364 struct sway_seat *seat = input_manager_current_seat(input_manager);
365 struct sway_container *focus = 365 struct sway_container *focus =
366 sway_seat_get_focus_inactive(seat, &root_container); 366 seat_get_focus_inactive(seat, &root_container);
367 if (!seat || !focus) { 367 if (!seat || !focus) {
368 return false; 368 return false;
369 } 369 }
370 struct sway_container *active_ws = focus; 370 struct sway_container *active_ws = focus;
371 if (active_ws->type != C_WORKSPACE) { 371 if (active_ws->type != C_WORKSPACE) {
372 container_parent(focus, C_WORKSPACE); 372 active_ws = container_parent(focus, C_WORKSPACE);
373 } 373 }
374 374
375 if (config->auto_back_and_forth 375 if (config->auto_back_and_forth
@@ -394,11 +394,11 @@ bool workspace_switch(struct sway_container *workspace) {
394 394
395 wlr_log(L_DEBUG, "Switching to workspace %p:%s", 395 wlr_log(L_DEBUG, "Switching to workspace %p:%s",
396 workspace, workspace->name); 396 workspace, workspace->name);
397 struct sway_container *next = sway_seat_get_focus_inactive(seat, workspace); 397 struct sway_container *next = seat_get_focus_inactive(seat, workspace);
398 if (next == NULL) { 398 if (next == NULL) {
399 next = workspace; 399 next = workspace;
400 } 400 }
401 sway_seat_set_focus(seat, next); 401 seat_set_focus(seat, next);
402 struct sway_container *output = container_parent(workspace, C_OUTPUT); 402 struct sway_container *output = container_parent(workspace, C_OUTPUT);
403 arrange_windows(output, -1, -1); 403 arrange_windows(output, -1, -1);
404 return true; 404 return true;
@@ -407,7 +407,7 @@ bool workspace_switch(struct sway_container *workspace) {
407bool workspace_is_visible(struct sway_container *ws) { 407bool workspace_is_visible(struct sway_container *ws) {
408 struct sway_container *output = container_parent(ws, C_OUTPUT); 408 struct sway_container *output = container_parent(ws, C_OUTPUT);
409 struct sway_seat *seat = input_manager_current_seat(input_manager); 409 struct sway_seat *seat = input_manager_current_seat(input_manager);
410 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); 410 struct sway_container *focus = seat_get_focus_inactive(seat, output);
411 if (focus->type != C_WORKSPACE) { 411 if (focus->type != C_WORKSPACE) {
412 focus = container_parent(focus, C_WORKSPACE); 412 focus = container_parent(focus, C_WORKSPACE);
413 } 413 }