X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=e11628c4959e16e2096aa325e70b3eca55617a0b;hb=e2b74645b224e53efd1920e76456d0051a109f92;hp=1e980f6f7c0f7bc8f96999e36f5162a3971f5403;hpb=781b60a19eee577164567adfd7d8b7bd5fa842e1;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index 1e980f6..e11628c 100755 --- a/autorandr.py +++ b/autorandr.py @@ -317,7 +317,7 @@ class XrandrOutput(object): else: edid = "%s-%s" % (XrandrOutput.EDID_UNAVAILABLE, match["output"]) - if not match["width"]: + if not match["connected"]: options["off"] = None else: if match["mode_name"]: @@ -656,9 +656,9 @@ def get_fb_dimensions(configuration): if "panning" in output.options: match = re.match("(?P[0-9]+)x(?P[0-9]+)(?:\+(?P[0-9]+))?(?:\+(?P[0-9]+))?.*", output.options["panning"]) if match: - detail = match.groupdict() - o_width = int(detail.get("w")) + int(detail.get("x", "0")) - o_height = int(detail.get("h")) + int(detail.get("y", "0")) + detail = match.groupdict(default="0") + o_width = int(detail.get("w")) + int(detail.get("x")) + o_height = int(detail.get("h")) + int(detail.get("y")) width = max(width, o_width) height = max(height, o_height) return int(width), int(height)