aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2018-04-02 15:24:25 -0400
committerLibravatar GitHub <noreply@github.com>2018-04-02 15:24:25 -0400
commit0c0cc79282b5ce29616893977aca629f90521988 (patch)
treee06d46f222487c4d266c09892d1907ce80b69a66 /sway/tree/layout.c
parentMerge pull request #1690 from swaywm/i3bar-json (diff)
parentfix segfault (diff)
downloadsway-0c0cc79282b5ce29616893977aca629f90521988.tar.gz
sway-0c0cc79282b5ce29616893977aca629f90521988.tar.zst
sway-0c0cc79282b5ce29616893977aca629f90521988.zip
Merge pull request #1699 from acrisci/seat-fixes
Seat fixes and cleanup
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index de210752..62ae0603 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -157,17 +157,17 @@ void container_move_to(struct sway_container *container,
157 } 157 }
158 wl_signal_emit(&container->events.reparent, old_parent); 158 wl_signal_emit(&container->events.reparent, old_parent);
159 if (container->type == C_WORKSPACE) { 159 if (container->type == C_WORKSPACE) {
160 struct sway_seat *seat = sway_input_manager_get_default_seat( 160 struct sway_seat *seat = input_manager_get_default_seat(
161 input_manager); 161 input_manager);
162 if (old_parent->children->length == 0) { 162 if (old_parent->children->length == 0) {
163 char *ws_name = workspace_next_name(old_parent->name); 163 char *ws_name = workspace_next_name(old_parent->name);
164 struct sway_container *ws = 164 struct sway_container *ws =
165 container_workspace_create(old_parent, ws_name); 165 container_workspace_create(old_parent, ws_name);
166 free(ws_name); 166 free(ws_name);
167 sway_seat_set_focus(seat, ws); 167 seat_set_focus(seat, ws);
168 } 168 }
169 container_sort_workspaces(new_parent); 169 container_sort_workspaces(new_parent);
170 sway_seat_set_focus(seat, new_parent); 170 seat_set_focus(seat, new_parent);
171 } 171 }
172 if (old_parent) { 172 if (old_parent) {
173 arrange_windows(old_parent, -1, -1); 173 arrange_windows(old_parent, -1, -1);
@@ -430,7 +430,7 @@ static struct sway_container *get_swayc_in_output_direction(
430 return NULL; 430 return NULL;
431 } 431 }
432 432
433 struct sway_container *ws = sway_seat_get_focus_inactive(seat, output); 433 struct sway_container *ws = seat_get_focus_inactive(seat, output);
434 if (ws->type != C_WORKSPACE) { 434 if (ws->type != C_WORKSPACE) {
435 ws = container_parent(ws, C_WORKSPACE); 435 ws = container_parent(ws, C_WORKSPACE);
436 } 436 }
@@ -451,7 +451,7 @@ static struct sway_container *get_swayc_in_output_direction(
451 case MOVE_UP: 451 case MOVE_UP:
452 case MOVE_DOWN: { 452 case MOVE_DOWN: {
453 struct sway_container *focused = 453 struct sway_container *focused =
454 sway_seat_get_focus_inactive(seat, ws); 454 seat_get_focus_inactive(seat, ws);
455 if (focused && focused->parent) { 455 if (focused && focused->parent) {
456 struct sway_container *parent = focused->parent; 456 struct sway_container *parent = focused->parent;
457 if (parent->layout == L_VERT) { 457 if (parent->layout == L_VERT) {
@@ -535,7 +535,7 @@ static struct sway_container *get_swayc_in_direction_under(
535 struct sway_container *container, enum movement_direction dir, 535 struct sway_container *container, enum movement_direction dir,
536 struct sway_seat *seat, struct sway_container *limit) { 536 struct sway_seat *seat, struct sway_container *limit) {
537 if (dir == MOVE_CHILD) { 537 if (dir == MOVE_CHILD) {
538 return sway_seat_get_focus_inactive(seat, container); 538 return seat_get_focus_inactive(seat, container);
539 } 539 }
540 540
541 struct sway_container *parent = container->parent; 541 struct sway_container *parent = container->parent;
@@ -595,7 +595,7 @@ static struct sway_container *get_swayc_in_direction_under(
595 } 595 }
596 if (next->children && next->children->length) { 596 if (next->children && next->children->length) {
597 // TODO consider floating children as well 597 // TODO consider floating children as well
598 return sway_seat_get_focus_inactive(seat, next); 598 return seat_get_focus_inactive(seat, next);
599 } else { 599 } else {
600 return next; 600 return next;
601 } 601 }