From 2693482d1074467b8c6a508f146a1f66ccd9ffaf Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 24 Feb 2022 04:26:04 +0100 Subject: [PATCH] platform: check all outputs, not only enabled ones for the enabled flag Otherwise it will block changes that will disable all currently enabled outputs but also enable some currently disabled output CCBUG: 450721 --- src/platform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform.cpp b/src/platform.cpp index 92a0470b67..aef6043139 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -115,8 +115,8 @@ void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interfa props->vrrPolicy = static_cast(changeset->vrrPolicy()); } - const auto outputs = enabledOutputs(); - bool allDisabled = !std::any_of(outputs.begin(), outputs.end(), [&cfg](const auto &output){ + const auto allOutputs = outputs(); + bool allDisabled = !std::any_of(allOutputs.begin(), allOutputs.end(), [&cfg](const auto &output){ auto o = qobject_cast(output); if (!o) { qCWarning(KWIN_CORE) << "Platform::requestOutputsChange should only be called for Wayland platforms!";