diff options
-rw-r--r-- | sway/input/seat.c | 4 | ||||
-rw-r--r-- | sway/tree/layout.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 078cb8b8..50134aae 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -123,7 +123,7 @@ static void handle_seat_container_destroy(struct wl_listener *listener, | |||
123 | 123 | ||
124 | static struct sway_seat_container *seat_container_from_container( | 124 | static struct sway_seat_container *seat_container_from_container( |
125 | struct sway_seat *seat, struct sway_container *con) { | 125 | struct sway_seat *seat, struct sway_container *con) { |
126 | if (con->type < C_WORKSPACE) { | 126 | if (con->type == C_ROOT || con->type == C_OUTPUT) { |
127 | // these don't get seat containers ever | 127 | // these don't get seat containers ever |
128 | return NULL; | 128 | return NULL; |
129 | } | 129 | } |
@@ -473,7 +473,7 @@ struct sway_container *seat_get_focus_by_type(struct sway_seat *seat, | |||
473 | 473 | ||
474 | struct sway_seat_container *current = NULL; | 474 | struct sway_seat_container *current = NULL; |
475 | wl_list_for_each(current, &seat->focus_stack, link) { | 475 | wl_list_for_each(current, &seat->focus_stack, link) { |
476 | if (type != C_TYPES && container->type != type) { | 476 | if (current->container->type != type && type != C_TYPES) { |
477 | continue; | 477 | continue; |
478 | } | 478 | } |
479 | 479 | ||
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 5abdbc32..1769609b 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -638,16 +638,16 @@ struct sway_container *container_get_in_direction( | |||
638 | wrap_candidate = parent->children->items[0]; | 638 | wrap_candidate = parent->children->items[0]; |
639 | } | 639 | } |
640 | if (config->force_focus_wrapping) { | 640 | if (config->force_focus_wrapping) { |
641 | return seat_get_focus_by_type(seat, | 641 | return wrap_candidate; |
642 | wrap_candidate, C_VIEW); | ||
643 | } | 642 | } |
644 | } | 643 | } |
645 | } else { | 644 | } else { |
645 | struct sway_container *desired_con = parent->children->items[desired]; | ||
646 | wlr_log(L_DEBUG, | 646 | wlr_log(L_DEBUG, |
647 | "cont %d-%p dir %i sibling %d: %p", idx, | 647 | "cont %d-%p dir %i sibling %d: %p", idx, |
648 | container, dir, desired, parent->children->items[desired]); | 648 | container, dir, desired, desired_con); |
649 | return seat_get_focus_by_type(seat, | 649 | struct sway_container *next = seat_get_focus_by_type(seat, desired_con, C_VIEW); |
650 | parent->children->items[desired], C_VIEW); | 650 | return next; |
651 | } | 651 | } |
652 | } | 652 | } |
653 | 653 | ||