]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Handle negative gamma values
authorPhillip Berndt <phillip.berndt@googlemail.com>
Sat, 11 Apr 2020 12:14:53 +0000 (14:14 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Sat, 11 Apr 2020 12:14:53 +0000 (14:14 +0200)
Fixes #188.

README.md
autorandr.py

index ab3d23d14f140f8a6a4e76371910a0655dea4d61..9e32355c27f72edbb468701a953f2b208c95363d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -215,6 +215,7 @@ profiles matching multiple (or any) monitors.
 ## Changelog
 
 **autorandr 1.10 (dev)**
+* *2020-04-11* Handle negative gamma values (fixes #188)
 * *2020-04-11* Sort approximate matches in detected profiles by quality of match
 * *2019-12-31* Fix output positioning if the top-left output is not the first
 * *2019-12-31* Accept negative gamma values (and interpret them as 0)
index 295d01aa7cd3ce96dbffbfc5c7cc52127b2697f9..c8765607bedc0b401a7cb231a731d463eb92fea2 100755 (executable)
@@ -172,7 +172,7 @@ class XrandrOutput(object):
         (?:[\ \t]*tracking\ (?P<tracking>[0-9]+x[0-9]+\+[0-9]+\+[0-9]+))?               # Tracking information
         (?:[\ \t]*border\ (?P<border>(?:[0-9]+/){3}[0-9]+))?                            # Border information
         (?:\s*(?:                                                                       # Properties of the output
-            Gamma: (?P<gamma>(?:inf|[0-9\.\-: e])+) |                                   # Gamma value
+            Gamma: (?P<gamma>(?:inf|-?[0-9\.\-: e])+) |                                 # Gamma value
             CRTC:\s*(?P<crtc>[0-9]) |                                                   # CRTC value
             Transform: (?P<transform>(?:[\-0-9\. ]+\s+){3}) |                           # Transformation matrix
             EDID: (?P<edid>\s*?(?:\\n\\t\\t[0-9a-f]+)+) |                               # EDID of the output