X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=autorandr.py;h=abf11980ca36be22b9ece76b64d569559120ede8;hb=e853c01c118e089b3b10670bec0174834289e809;hp=c14aa723869dd2a16d5aacb6f67316a2f5563ce2;hpb=9f298553bee66ae0f992946dca30009ec9e9c8e6;p=deb_pkgs%2Fautorandr.git diff --git a/autorandr.py b/autorandr.py index c14aa72..abf1198 100755 --- a/autorandr.py +++ b/autorandr.py @@ -656,9 +656,9 @@ def apply_configuration(new_configuration, current_configuration, dry_run=False) option_vector = new_configuration[output].option_vector if xrandr_version() >= Version("1.3.0"): - for option in ("transform", "panning"): + for option, off_value in (("transform", "none"), ("panning", "0x0")): if option in current_configuration[output].options: - auxiliary_changes_pre.append(["--output", output, "--%s" % option, "none"]) + auxiliary_changes_pre.append(["--output", output, "--%s" % option, off_value]) else: try: option_index = option_vector.index("--%s" % option) @@ -957,8 +957,8 @@ def dispatch_call_to_sessions(argv): process_environ = {} for environ_entry in open(environ_file).read().split("\0"): - if "=" in environ_entry: - name, value = environ_entry.split("=", 1) + name, sep, value = environ_entry.partition("=") + if name and sep: if name == "DISPLAY" and "." in value: value = value[:value.find(".")] process_environ[name] = value