aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-04-02 13:23:43 -0400
committerTony Crisci <tony@dubstepdish.com>2018-04-02 13:23:43 -0400
commit5e024278a62e6fb00a0521240244c428d2382984 (patch)
treed9010d33d4d576297cc5e40d41bed4bb7bf5631a /sway/desktop/output.c
parent22287b42bf323457d779b1023764ade83313b199 (diff)
parent2a8985a3451f8be7e4b1eb21e3266e9f5b979b39 (diff)
Merge branch 'wlroots' into seat-fixes
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index ea3938a4..5e8a081c 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -229,9 +229,12 @@ 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 =
seat_get_focus_inactive(seat, output->swayc);
- struct sway_container *workspace = (focus->type == C_WORKSPACE ?
- focus :
- container_parent(focus, C_WORKSPACE));
+ 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,