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 | |
parent | Xwayland unmanaged views aren't views anymore (diff) | |
parent | Merge pull request #1699 from acrisci/seat-fixes (diff) | |
download | sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.gz sway-a4a241697ae591289d7c14eff972e1ef787216e2.tar.zst sway-a4a241697ae591289d7c14eff972e1ef787216e2.zip |
Merge branch 'wlroots' into view-redesign
Diffstat (limited to 'sway/desktop')
-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, | |||
245 | 245 | ||
246 | struct sway_seat *seat = input_manager_current_seat(input_manager); | 246 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
247 | struct sway_container *focus = | 247 | struct sway_container *focus = |
248 | sway_seat_get_focus_inactive(seat, output->swayc); | 248 | seat_get_focus_inactive(seat, output->swayc); |
249 | struct sway_container *workspace = (focus->type == C_WORKSPACE ? | 249 | if (!focus) { |
250 | focus : | 250 | // We've never been to this output before |
251 | container_parent(focus, C_WORKSPACE)); | 251 | focus = output->swayc->children->items[0]; |
252 | } | ||
253 | struct sway_container *workspace = focus->type == C_WORKSPACE ? | ||
254 | focus : container_parent(focus, C_WORKSPACE); | ||
252 | 255 | ||
253 | struct render_data rdata = { | 256 | struct render_data rdata = { |
254 | .output = output, | 257 | .output = output, |
@@ -393,7 +396,7 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
393 | wl_list_init(&output->layers[i]); | 396 | wl_list_init(&output->layers[i]); |
394 | } | 397 | } |
395 | 398 | ||
396 | sway_input_manager_configure_xcursor(input_manager); | 399 | input_manager_configure_xcursor(input_manager); |
397 | 400 | ||
398 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); | 401 | wl_signal_add(&wlr_output->events.destroy, &output->destroy); |
399 | output->destroy.notify = handle_destroy; | 402 | output->destroy.notify = handle_destroy; |