diff options
-rw-r--r-- | sway/desktop/output.c | 2 | ||||
-rw-r--r-- | sway/tree/layout.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a3d9efd8..039aba25 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -51,7 +51,7 @@ static void render_surface(struct wlr_surface *surface, | |||
51 | 51 | ||
52 | // FIXME: view coords are inconsistently assumed to be in output or layout coords | 52 | // FIXME: view coords are inconsistently assumed to be in output or layout coords |
53 | struct wlr_box layout_box = { | 53 | struct wlr_box layout_box = { |
54 | .x = lx + owidth, .y = ly + oheight, | 54 | .x = lx + wlr_output->lx, .y = ly + wlr_output->ly, |
55 | .width = render_width, .height = render_height, | 55 | .width = render_width, .height = render_height, |
56 | }; | 56 | }; |
57 | if (wlr_output_layout_intersects(layout, wlr_output, &layout_box)) { | 57 | if (wlr_output_layout_intersects(layout, wlr_output, &layout_box)) { |
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index be494791..3c78b6bc 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -531,7 +531,10 @@ static swayc_t *get_swayc_in_direction_under(swayc_t *container, | |||
531 | return wrap_candidate; | 531 | return wrap_candidate; |
532 | } | 532 | } |
533 | swayc_t *next = get_swayc_in_output_direction(adjacent, dir, seat); | 533 | swayc_t *next = get_swayc_in_output_direction(adjacent, dir, seat); |
534 | if (next->children->length) { | 534 | if (next == NULL) { |
535 | return NULL; | ||
536 | } | ||
537 | if (next->children && next->children->length) { | ||
535 | // TODO consider floating children as well | 538 | // TODO consider floating children as well |
536 | return sway_seat_get_focus_inactive(seat, next); | 539 | return sway_seat_get_focus_inactive(seat, next); |
537 | } else { | 540 | } else { |