From a04609b46f91e3ac5c74208cabfacc1865652278 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 31 Mar 2023 10:46:26 +0300 Subject: [PATCH] wayland: Fix output order sanitization in kde-output-management-v2 We need to remove disabled outputs. --- src/wayland/outputmanagement_v2_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/outputmanagement_v2_interface.cpp b/src/wayland/outputmanagement_v2_interface.cpp index a17a71b9be..6f08639ad4 100644 --- a/src/wayland/outputmanagement_v2_interface.cpp +++ b/src/wayland/outputmanagement_v2_interface.cpp @@ -292,9 +292,9 @@ void OutputConfigurationV2Interface::kde_output_configuration_v2_apply(Resource outputOrder.erase(std::remove_if(outputOrder.begin(), outputOrder.end(), [this](const auto &pair) { const auto changeset = config.constChangeSet(pair.second->handle()); if (changeset && changeset->enabled.has_value()) { - return *changeset->enabled; + return !changeset->enabled.value(); } else { - return pair.second->handle()->isEnabled(); + return !pair.second->handle()->isEnabled(); } }), outputOrder.end());