mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
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
This commit is contained in:
parent
c85789a3a9
commit
2603a5dee7
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue