]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Consider screen rotation in `get_fb_dimensions`
authorJan-Oliver Kaiser <mail@janno-kaiser.de>
Mon, 27 Aug 2018 11:14:55 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Aug 2018 11:14:55 +0000 (13:14 +0200)
This should fix phillipberndt/autorandr#116.

autorandr.py

index 4187932632c1bb008c3d88cad62a31f1f1912611..9524f4274d8275ca32bb9b53c8d55673cd1a5684 100755 (executable)
@@ -645,6 +645,9 @@ def get_fb_dimensions(configuration):
             x = (a * o_width + b * o_height + c) / w
             y = (d * o_width + e * o_height + f) / w
             o_width, o_height = x, y
+        if "rotate" in output.options:
+            if output.options["rotate"] in ("left", "right"):
+                o_width, o_height = o_height, o_width
         if "pos" in output.options:
             o_left, o_top = map(int, output.options["pos"].split("x"))
             o_width += o_left