aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2019-03-21 21:12:43 +0100
committeremersion <contact@emersion.fr>2019-03-21 22:12:43 +0200
commitcd60f40bbb973c8e68bad547190640aa16f0d5b9 (patch)
tree20aab1cfbdec0f37b1d567cb89eb787ae2b56ea2 /backend
parent4453757fc9fa357288423ef3b54af3a1d7f35366 (diff)
wlr_output: Add preferred property (#1625)
* wlr_output: Indicate modes link * wlr_output: Introduce preferred flag This indicates an outputs preferred mode. * drm: Set preferred flag for an outputs preferred mode
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 7fd36794..f179f835 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1207,6 +1207,9 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
mode->wlr_mode.width = mode->drm_mode.hdisplay;
mode->wlr_mode.height = mode->drm_mode.vdisplay;
mode->wlr_mode.refresh = calculate_refresh_rate(&mode->drm_mode);
+ if (mode->drm_mode.type & DRM_MODE_TYPE_PREFERRED) {
+ mode->wlr_mode.preferred = true;
+ }
wlr_log(WLR_INFO, " %"PRId32"x%"PRId32"@%"PRId32,
mode->wlr_mode.width, mode->wlr_mode.height,