]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
A screen can be disabled yet primary
authorPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 5 Apr 2015 23:26:32 +0000 (01:26 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 5 Apr 2015 23:26:32 +0000 (01:26 +0200)
autorandr.py

index 257f2f9c6d622fca517f2648fc38b54770cef5dc..526a753f15d524f51e45a3b1918c37a562486a2d 100755 (executable)
@@ -85,8 +85,9 @@ class XrandrOutput(object):
             unknown\ connection |
             (?P<connected>connected)
         )
-        (?:\s*
-            (?P<primary>primary\ )?                                                     # Might be primary screen
+        \s*
+        (?P<primary>primary\ )?                                                         # Might be primary screen
+        (?:\s*                                                                          # The remainder of the first line only appears as one or not at all:
             (?P<width>[0-9]+)x(?P<height>[0-9]+)                                        # Resolution (might be overridden below!)
             \+(?P<x>[0-9]+)\+(?P<y>[0-9]+)\s+                                           # Position
             (?:\(0x[0-9a-fA-F]+\)\s+)?                                                  # XID