diff --git a/NEWS b/NEWS index d485a04..d56a02d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +* Fix the 'primary' issue + - ignores the primary keyword + - makes ARandR compatible with xrandr 1.4.0 * Merged parts of the cglita branch - solves ValueError / "1080p" issue * New translations: diff --git a/TODO b/TODO index 2200f0b..6d38fd1 100644 --- a/TODO +++ b/TODO @@ -26,6 +26,9 @@ ARandR TODO list 5. arandr knows what he sees and can position displays and offer to apply a matrix * be more intelligent about future xrandr versions (cf debian #523903) + + * parse versions instead of just looking for a string -- '1.3' in output_string won't help detecting an 1.4 client that spews new keywords + * read --props, parse edid (using parse-edid from read-edid; dispcalGUI has dispcalGUI/edid.py with a parse_edid that just works), maybe even offer setting properties * sigrok has a pure python implementation at http://sigrok.git.sourceforge.net/git/gitweb.cgi?p=sigrok/sigrok;a=blob;f=libsigrokdecode/decoders/edid/edid.py diff --git a/screenlayout/xrandr.py b/screenlayout/xrandr.py index 6931cec..8fddb9a 100644 --- a/screenlayout/xrandr.py +++ b/screenlayout/xrandr.py @@ -38,7 +38,7 @@ def __init__(self, display=None, force_version=False): self.environ['DISPLAY'] = display version_output = self._output("--version") - if not ("1.2" in version_output or "1.3" in version_output) and not force_version: + if not ("1.2" in version_output or "1.3" in version_output or "1.4" in version_output) and not force_version: raise Exception("XRandR 1.2/1.3 required.") def _get_outputs(self): @@ -135,6 +135,9 @@ def load_from_x(self): # FIXME -- use a library o.connected = (hsplit[1] in ('connected', 'unknown-connection')) + if 'primary' in hsplit: + hsplit.remove('primary') + if not hsplit[2].startswith("("): active = True