diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-10-26 14:00:37 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-10-26 14:00:37 +0200 |
| commit | 8214d5d1671f5efc9559ae43d406529e82506217 (patch) | |
| tree | 36a4a947b4fb9d89fec848a2e269304ded139621 /include | |
| parent | 5daae5e8f07287e40a0cb6afa5fa444a4bb0cac4 (diff) | |
Fix segfault in wlr_output_manager_v1_set_configuration
Calling wlr_output_manager_v1_set_configuration with an enabled output
and a NULL mode is incorrect if the output doesn't support modes.
When DPMS'ing an output, wlr_output_enable(output, false) is called.
This de-allocates the CRTC and sets wlr_output.current_mode to NULL.
Because we mark DPMS'ed outputs as enabled, we also need to provide a
correct output mode. Add a field to sway_output to hold the current
mode.
Closes: https://github.com/swaywm/wlroots/issues/1867
Diffstat (limited to 'include')
| -rw-r--r-- | include/sway/output.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index c52b3094..7d7057e1 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -32,6 +32,8 @@ struct sway_output { int lx, ly; // layout coords int width, height; // transformed buffer size enum wl_output_subpixel detected_subpixel; + // last applied mode when the output is DPMS'ed + struct wlr_output_mode *current_mode; bool enabled, configured; list_t *workspaces; |
