From: Phillip Berndt Date: Wed, 11 Jul 2018 07:02:50 +0000 (+0200) Subject: Bugfix: Fix is_equal_configuration() "off" comparison X-Git-Tag: 1.6~6 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=59e50efac123ba8b99589d30104be2eae2f5ebed Bugfix: Fix is_equal_configuration() "off" comparison --- diff --git a/README.md b/README.md index 4dbb0c5..643cac9 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,7 @@ profiles matching multiple (or any) monitors. * *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 **autorandr 1.5** diff --git a/autorandr.py b/autorandr.py index 2a4ddb7..30fa225 100755 --- a/autorandr.py +++ b/autorandr.py @@ -761,7 +761,7 @@ def is_equal_configuration(source_configuration, target_configuration): """ for output in target_configuration.keys(): if "off" in target_configuration[output].options: - if (output in source_configuration or "off" not in source_configuration[output].options): + if (output in source_configuration and "off" not in source_configuration[output].options): return False else: if (output not in source_configuration) or (source_configuration[output] != target_configuration[output]):