aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 08:45:37 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 08:45:37 -0400
commite677c5b204971af00d71f9a50a89206d01b46a36 (patch)
treefa94a13e95119bdd3083fb7839889f2ce3a0fca0 /sway/tree/workspace.c
parentMerge pull request #1684 from swaywm/follow-warp (diff)
downloadsway-e677c5b204971af00d71f9a50a89206d01b46a36.tar.gz
sway-e677c5b204971af00d71f9a50a89206d01b46a36.tar.zst
sway-e677c5b204971af00d71f9a50a89206d01b46a36.zip
rename seat functions
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index c629f1f1..c47bab33 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -158,7 +158,7 @@ static bool _workspace_by_name(struct sway_container *view, void *data) {
158struct sway_container *workspace_by_name(const char *name) { 158struct sway_container *workspace_by_name(const char *name) {
159 struct sway_seat *seat = input_manager_current_seat(input_manager); 159 struct sway_seat *seat = input_manager_current_seat(input_manager);
160 struct sway_container *current_workspace = NULL, *current_output = NULL; 160 struct sway_container *current_workspace = NULL, *current_output = NULL;
161 struct sway_container *focus = sway_seat_get_focus(seat); 161 struct sway_container *focus = seat_get_focus(seat);
162 if (focus) { 162 if (focus) {
163 current_workspace = container_parent(focus, C_WORKSPACE); 163 current_workspace = container_parent(focus, C_WORKSPACE);
164 current_output = container_parent(focus, C_OUTPUT); 164 current_output = container_parent(focus, C_OUTPUT);
@@ -200,7 +200,7 @@ struct sway_container *workspace_create(const char *name) {
200 // Otherwise create a new one 200 // Otherwise create a new one
201 struct sway_seat *seat = input_manager_current_seat(input_manager); 201 struct sway_seat *seat = input_manager_current_seat(input_manager);
202 struct sway_container *focus = 202 struct sway_container *focus =
203 sway_seat_get_focus_inactive(seat, &root_container); 203 seat_get_focus_inactive(seat, &root_container);
204 parent = focus; 204 parent = focus;
205 parent = container_parent(parent, C_OUTPUT); 205 parent = container_parent(parent, C_OUTPUT);
206 struct sway_container *new_ws = container_workspace_create(parent, name); 206 struct sway_container *new_ws = container_workspace_create(parent, name);
@@ -260,7 +260,7 @@ struct sway_container *workspace_output_prev_next_impl(
260 } 260 }
261 261
262 struct sway_seat *seat = input_manager_current_seat(input_manager); 262 struct sway_seat *seat = input_manager_current_seat(input_manager);
263 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); 263 struct sway_container *focus = seat_get_focus_inactive(seat, output);
264 struct sway_container *workspace = (focus->type == C_WORKSPACE ? 264 struct sway_container *workspace = (focus->type == C_WORKSPACE ?
265 focus : 265 focus :
266 container_parent(focus, C_WORKSPACE)); 266 container_parent(focus, C_WORKSPACE));
@@ -345,7 +345,7 @@ bool workspace_switch(struct sway_container *workspace) {
345 } 345 }
346 struct sway_seat *seat = input_manager_current_seat(input_manager); 346 struct sway_seat *seat = input_manager_current_seat(input_manager);
347 struct sway_container *focus = 347 struct sway_container *focus =
348 sway_seat_get_focus_inactive(seat, &root_container); 348 seat_get_focus_inactive(seat, &root_container);
349 if (!seat || !focus) { 349 if (!seat || !focus) {
350 return false; 350 return false;
351 } 351 }
@@ -376,11 +376,11 @@ bool workspace_switch(struct sway_container *workspace) {
376 376
377 wlr_log(L_DEBUG, "Switching to workspace %p:%s", 377 wlr_log(L_DEBUG, "Switching to workspace %p:%s",
378 workspace, workspace->name); 378 workspace, workspace->name);
379 struct sway_container *next = sway_seat_get_focus_inactive(seat, workspace); 379 struct sway_container *next = seat_get_focus_inactive(seat, workspace);
380 if (next == NULL) { 380 if (next == NULL) {
381 next = workspace; 381 next = workspace;
382 } 382 }
383 sway_seat_set_focus(seat, next); 383 seat_set_focus(seat, next);
384 struct sway_container *output = container_parent(workspace, C_OUTPUT); 384 struct sway_container *output = container_parent(workspace, C_OUTPUT);
385 arrange_windows(output, -1, -1); 385 arrange_windows(output, -1, -1);
386 return true; 386 return true;
@@ -389,7 +389,7 @@ bool workspace_switch(struct sway_container *workspace) {
389bool workspace_is_visible(struct sway_container *ws) { 389bool workspace_is_visible(struct sway_container *ws) {
390 struct sway_container *output = container_parent(ws, C_OUTPUT); 390 struct sway_container *output = container_parent(ws, C_OUTPUT);
391 struct sway_seat *seat = input_manager_current_seat(input_manager); 391 struct sway_seat *seat = input_manager_current_seat(input_manager);
392 struct sway_container *focus = sway_seat_get_focus_inactive(seat, output); 392 struct sway_container *focus = seat_get_focus_inactive(seat, output);
393 if (focus->type != C_WORKSPACE) { 393 if (focus->type != C_WORKSPACE) {
394 focus = container_parent(focus, C_WORKSPACE); 394 focus = container_parent(focus, C_WORKSPACE);
395 } 395 }