diff options
author | emersion <contact@emersion.fr> | 2018-04-02 15:30:58 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-04-02 15:30:58 -0400 |
commit | a4a241697ae591289d7c14eff972e1ef787216e2 (patch) | |
tree | d82d3c3eba2946670aa634a62d03feb7102f0bf8 /sway/desktop/output.c | |
parent | 2f64ce86c47efb2ee4c0e3a3c2b31307d21404d9 (diff) | |
parent | 0c0cc79282b5ce29616893977aca629f90521988 (diff) |
Merge branch 'wlroots' into view-redesign
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 352f4af3..10ed1f6d 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -245,10 +245,13 @@ static void render_output(struct sway_output *output, struct timespec *when, struct sway_seat *seat = input_manager_current_seat(input_manager); struct sway_container *focus = - sway_seat_get_focus_inactive(seat, output->swayc); - struct sway_container *workspace = (focus->type == C_WORKSPACE ? - focus : - container_parent(focus, C_WORKSPACE)); + seat_get_focus_inactive(seat, output->swayc); + if (!focus) { + // We've never been to this output before + focus = output->swayc->children->items[0]; + } + struct sway_container *workspace = focus->type == C_WORKSPACE ? + focus : container_parent(focus, C_WORKSPACE); struct render_data rdata = { .output = output, @@ -393,7 +396,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { wl_list_init(&output->layers[i]); } - sway_input_manager_configure_xcursor(input_manager); + input_manager_configure_xcursor(input_manager); wl_signal_add(&wlr_output->events.destroy, &output->destroy); output->destroy.notify = handle_destroy; |