backend/drm: fix missing wlr_output_state.allow_artifacts

Without allow_artifacts, applying the new state will fail because
it requires ALLOW_MODESET.

Fixes VT switch and disabling CRTCs.
This commit is contained in:
Simon Ser 2022-09-30 13:35:07 +02:00
parent a0345f2854
commit 651c876e79
2 changed files with 2 additions and 0 deletions

View file

@ -115,6 +115,7 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
}
struct wlr_output_state state = {
.committed = committed,
.allow_artifacts = true,
.enabled = mode != NULL,
.mode_type = WLR_OUTPUT_STATE_MODE_FIXED,
.mode = mode,

View file

@ -1050,6 +1050,7 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
struct wlr_output_state output_state = {
.committed = WLR_OUTPUT_STATE_ENABLED,
.allow_artifacts = true,
.enabled = false,
};
struct wlr_drm_connector_state conn_state = {0};