mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-23 01:40:31 -05:00
output: Set output mode during main commit
Removes duplication across all the backends to finally apply the mode to the output.
This commit is contained in:
parent
530e58b96e
commit
8243399385
5 changed files with 14 additions and 21 deletions
|
|
@ -762,19 +762,6 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
|
|||
conn->cursor_enabled = false;
|
||||
conn->crtc = NULL;
|
||||
}
|
||||
if (pending.base->committed & WLR_OUTPUT_STATE_MODE) {
|
||||
switch (pending.base->mode_type) {
|
||||
case WLR_OUTPUT_STATE_MODE_FIXED:
|
||||
wlr_output_update_mode(&conn->output, pending.base->mode);
|
||||
break;
|
||||
case WLR_OUTPUT_STATE_MODE_CUSTOM:
|
||||
wlr_output_update_custom_mode(&conn->output,
|
||||
pending.base->custom_mode.width,
|
||||
pending.base->custom_mode.height,
|
||||
pending.base->custom_mode.refresh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (flags & DRM_MODE_PAGE_FLIP_EVENT) {
|
||||
conn->pending_page_flip_crtc = conn->crtc->id;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue