From 59e50efac123ba8b99589d30104be2eae2f5ebed Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Wed, 11 Jul 2018 09:02:50 +0200 Subject: [PATCH] Bugfix: Fix is_equal_configuration() "off" comparison --- README.md | 1 + autorandr.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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]): -- 2.39.2