mirror of
https://github.com/NickHu/sway
synced 2024-12-28 22:23:30 +01:00
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.
This commit is contained in:
parent
bea9f9c63f
commit
5967ee1fbc
1 changed files with 1 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue