From 5967ee1fbcba66ea57d971b924a51209a70d3aaa Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 6 Sep 2018 20:20:29 +1000 Subject: Fix crash when switching to new workspace during transaction When rendering, the workspace for the output needs to be retrieved from the output's `current` state. output_get_active_workspace returns the pending workspace, which crashes if the pending workspace is new and hasn't completed a transaction yet. --- sway/desktop/render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway') diff --git a/sway/desktop/render.c b/sway/desktop/render.c index bb3902ec..d72d72bf 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -871,7 +871,7 @@ void output_render(struct sway_output *output, struct timespec *when, pixman_region32_union_rect(damage, damage, 0, 0, width, height); } - struct sway_workspace *workspace = output_get_active_workspace(output); + struct sway_workspace *workspace = output->current.active_workspace; struct sway_container *fullscreen_con = workspace->current.fullscreen; if (output_has_opaque_overlay_layer_surface(output)) { -- cgit v1.2.3-54-g00ecf