diff options
-rw-r--r-- | sway/config/output.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 9fff79fd..8e937b28 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -406,9 +406,16 @@ static void queue_output_config(struct output_config *oc, | |||
406 | wlr_output_set_subpixel(wlr_output, oc->subpixel); | 406 | wlr_output_set_subpixel(wlr_output, oc->subpixel); |
407 | } | 407 | } |
408 | 408 | ||
409 | enum wl_output_transform tr = WL_OUTPUT_TRANSFORM_NORMAL; | ||
409 | if (oc && oc->transform >= 0) { | 410 | if (oc && oc->transform >= 0) { |
410 | sway_log(SWAY_DEBUG, "Set %s transform to %d", oc->name, oc->transform); | 411 | tr = oc->transform; |
411 | wlr_output_set_transform(wlr_output, oc->transform); | 412 | } else if (wlr_output_is_drm(wlr_output)) { |
413 | tr = wlr_drm_connector_get_panel_orientation(wlr_output); | ||
414 | sway_log(SWAY_DEBUG, "Auto-detected output transform: %d", tr); | ||
415 | } | ||
416 | if (wlr_output->transform != tr) { | ||
417 | sway_log(SWAY_DEBUG, "Set %s transform to %d", oc->name, tr); | ||
418 | wlr_output_set_transform(wlr_output, tr); | ||
412 | } | 419 | } |
413 | 420 | ||
414 | // Apply the scale last before the commit, because the scale auto-detection | 421 | // Apply the scale last before the commit, because the scale auto-detection |