aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-06 20:20:29 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-06 20:20:29 +1000
commit5967ee1fbcba66ea57d971b924a51209a70d3aaa (patch)
tree2f94c65cbd7a5d5f3fb4b12e960b8aaeabe32b3b /sway/desktop/render.c
parentMerge pull request #2578 from RyanDwyer/fix-binding-reload (diff)
downloadsway-5967ee1fbcba66ea57d971b924a51209a70d3aaa.tar.gz
sway-5967ee1fbcba66ea57d971b924a51209a70d3aaa.tar.zst
sway-5967ee1fbcba66ea57d971b924a51209a70d3aaa.zip
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.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c2
1 files changed, 1 insertions, 1 deletions
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,
871 pixman_region32_union_rect(damage, damage, 0, 0, width, height); 871 pixman_region32_union_rect(damage, damage, 0, 0, width, height);
872 } 872 }
873 873
874 struct sway_workspace *workspace = output_get_active_workspace(output); 874 struct sway_workspace *workspace = output->current.active_workspace;
875 struct sway_container *fullscreen_con = workspace->current.fullscreen; 875 struct sway_container *fullscreen_con = workspace->current.fullscreen;
876 876
877 if (output_has_opaque_overlay_layer_surface(output)) { 877 if (output_has_opaque_overlay_layer_surface(output)) {