Add support for DRM panel orientation

References: https://github.com/swaywm/wlroots/pull/3205
master
Simon Ser 3 years ago
parent 5fdc1c894d
commit 1bd8e3b469

@ -406,9 +406,16 @@ static void queue_output_config(struct output_config *oc,
wlr_output_set_subpixel(wlr_output, oc->subpixel); wlr_output_set_subpixel(wlr_output, oc->subpixel);
} }
enum wl_output_transform tr = WL_OUTPUT_TRANSFORM_NORMAL;
if (oc && oc->transform >= 0) { if (oc && oc->transform >= 0) {
sway_log(SWAY_DEBUG, "Set %s transform to %d", oc->name, oc->transform); tr = oc->transform;
wlr_output_set_transform(wlr_output, oc->transform); } else if (wlr_output_is_drm(wlr_output)) {
tr = wlr_drm_connector_get_panel_orientation(wlr_output);
sway_log(SWAY_DEBUG, "Auto-detected output transform: %d", tr);
}
if (wlr_output->transform != tr) {
sway_log(SWAY_DEBUG, "Set %s transform to %d", oc->name, tr);
wlr_output_set_transform(wlr_output, tr);
} }
// Apply the scale last before the commit, because the scale auto-detection // Apply the scale last before the commit, because the scale auto-detection

Loading…
Cancel
Save