X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=blobdiff_plain;f=autorandr.py;h=9524f4274d8275ca32bb9b53c8d55673cd1a5684;hp=f3612cb6cca730c1d490eea1cb0924b1b7ffb247;hb=1a48d584fe533555581f3f98818cd0ad9bd92334;hpb=6511ee3cb3d69d0053129ce6584e65570e10f122 diff --git a/autorandr.py b/autorandr.py index f3612cb..9524f42 100755 --- a/autorandr.py +++ b/autorandr.py @@ -48,7 +48,7 @@ if sys.version_info.major == 2: else: import configparser -__version__ = "1.5" +__version__ = "1.6" try: input = raw_input @@ -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 @@ -768,7 +771,7 @@ def is_equal_configuration(source_configuration, target_configuration): return False for output in source_configuration.keys(): if "off" in source_configuration[output].options: - if output in target_configuration and "off" not in target_configuration.options: + if output in target_configuration and "off" not in target_configuration[output].options: return False else: if output not in target_configuration: