From: Jan-Oliver Kaiser Date: Mon, 27 Aug 2018 11:14:55 +0000 (+0200) Subject: Consider screen rotation in `get_fb_dimensions` X-Git-Tag: 1.7~1^2~1 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=1a48d584fe533555581f3f98818cd0ad9bd92334 Consider screen rotation in `get_fb_dimensions` This should fix phillipberndt/autorandr#116. --- diff --git a/autorandr.py b/autorandr.py index 4187932..9524f42 100755 --- a/autorandr.py +++ b/autorandr.py @@ -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