diff options
author | Kenny Levinsen <kl@kl.wtf> | 2021-04-30 00:55:26 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-30 21:33:28 +0200 |
commit | 2603a5dee71ceb3cbf566e1f874ca2defecbb1c9 (patch) | |
tree | 0f8ce6d5b18f1d5d756d37c27bd2b749440c475c /backend/drm/drm.c | |
parent | c85789a3a9f6f851e6fbc900495057ba91b3e255 (diff) |
backend/drm: Do not require mode commit on enable
If a mode is not provided, use the current mode intead.
Closes: https://github.com/swaywm/wlroots/issues/2904
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index d97f753f..2c9560f1 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -729,9 +729,12 @@ static bool drm_connector_set_mode(struct wlr_drm_connector *conn, struct wlr_output_mode *wlr_mode = NULL; if (drm_connector_state_active(conn, state)) { - assert(state->committed & WLR_OUTPUT_STATE_MODE); - assert(state->mode_type == WLR_OUTPUT_STATE_MODE_FIXED); - wlr_mode = state->mode; + if (state->committed & WLR_OUTPUT_STATE_MODE) { + assert(state->mode_type == WLR_OUTPUT_STATE_MODE_FIXED); + wlr_mode = state->mode; + } else { + wlr_mode = conn->output.current_mode; + } } conn->desired_enabled = wlr_mode != NULL; |