]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorMaciej Sitarz <macieksitarz@wp.pl>
Fri, 28 Sep 2018 08:31:20 +0000 (10:31 +0200)
committerMaciej Sitarz <macieksitarz@wp.pl>
Fri, 28 Sep 2018 08:31:20 +0000 (10:31 +0200)
README.md
autorandr.py
contrib/packaging/autorandr.spec
contrib/systemd/autorandr.service
setup.py

index 643cac912bd5ff37b9dd5977fd740fe5ee17d8e4..71b3aebe2923d4c8ac2a882d86e76ae3cd8b6c59 100644 (file)
--- a/README.md
+++ b/README.md
@@ -56,6 +56,7 @@ Contributors to this version of autorandr are:
 * Timo Kaufmann
 * Tomasz Bogdal
 * Victor Häggqvist
+* Jan-Oliver Kaiser
 
 ## Installation/removal
 
@@ -210,10 +211,18 @@ profiles matching multiple (or any) monitors.
 
 ## Changelog
 
+**autorandr 1.7**
+
+* *2018-09-25* Fix FB size computation with rotated screens (by @Janno, #117)
+
+**autorandr 1.6**
+
 * *2018-04-19* Bugfix: Do not load default profile unless --change is set
 * *2018-04-30* Added a `AUTORANDR_MONITORS` variable to hooks (by @bricewge, #106)
 * *2018-06-29* Fix detection of current configuration if extra monitors are active
 * *2018-07-11* Bugfix in the latest change: Correctly handle "off" minitors when comparing
+* *2018-07-19* Do not kill spawned user processes from systemd unit
+* *2018-07-20* Correctly handle "off" monitors when comparing -- fixup for another bug.
 
 **autorandr 1.5**
 
index 30fa225ade5599340d27e59fe052576c8c8b69fe..d36b568485aca6e87a3b61e83ada3be63fe866b6 100755 (executable)
@@ -48,7 +48,7 @@ if sys.version_info.major == 2:
 else:
     import configparser
 
-__version__ = "1.5"
+__version__ = "1.7"
 
 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:
@@ -1073,6 +1076,15 @@ def dispatch_call_to_sessions(argv):
             X11_displays_done.add(display)
 
 
+def enabled_monitors(config):
+    monitors = []
+    for monitor in config:
+        if "--off" in config[monitor].option_vector:
+            continue
+        monitors.append(monitor)
+    return monitors
+
+
 def read_config(options, directory):
     """Parse a configuration config.ini from directory and merge it into
     the options dictionary"""
@@ -1178,7 +1190,7 @@ def main(argv):
             exec_scripts(profile_folder, "postsave", {
                 "CURRENT_PROFILE": options["--save"],
                 "PROFILE_FOLDER": profile_folder,
-                "MONITORS": ":".join(config.keys()),
+                "MONITORS": ":".join(enabled_monitors(config)),
             })
         except Exception as e:
             raise AutorandrException("Failed to save current configuration as profile '%s'" % (options["--save"],), e)
@@ -1299,7 +1311,7 @@ def main(argv):
                 script_metadata = {
                     "CURRENT_PROFILE": load_profile,
                     "PROFILE_FOLDER": scripts_path,
-                    "MONITORS": ":".join(load_config.keys()),
+                    "MONITORS": ":".join(enabled_monitors(load_config)),
                 }
                 exec_scripts(scripts_path, "preswitch", script_metadata)
                 if "--debug" in options:
index f349aba889276be235a64367ae628ef774e291a9..ffbb4e7f738dbe127bcca6423fe63d45a8b03b6e 100644 (file)
@@ -7,15 +7,13 @@
 %endif
 
 Name:           autorandr
-Version:        1.5.1
+Version:        1.5
 Release:        1%{?dist}
 Summary:        Automatically select a display configuration based on connected devices
 
 License:        GPL
-#URL:            https://github.com/phillipberndt/autorandr
-#Source0:        https://github.com/phillipberndt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
-URL:            https://github.com/maciex/autorandr
-Source0:        https://github.com/maciex/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+URL:            https://github.com/phillipberndt/autorandr
+Source0:        https://github.com/phillipberndt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
 
 BuildArch:     noarch
 Requires:       python2
index d270c5e68e7c4caee09711ef8e3227b39409b8ba..20277f9a66f5d343168cf6bdd6938012538d1e13 100644 (file)
@@ -11,6 +11,7 @@ StartLimitBurst=1
 ExecStart=/usr/bin/autorandr --batch --change --default default
 Type=oneshot
 RemainAfterExit=false
+KillMode=process
 
 [Install]
 WantedBy=sleep.target
index 28562ec3d805080c65b4088b98dc18b390b37156..02b347aa7a7f01e3d60f1a10061d7901f68551b7 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ except:
 setup(
     name='autorandr',
 
-    version='1.5-1',
+    version='1.7-1',
 
     description='Automatically select a display configuration based on connected devices',
     long_description=long_description,