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
This commit is contained in:
Xaver Hugl 2022-02-24 04:26:04 +01:00
parent abcf22b4d6
commit 2693482d10

View file

@ -115,8 +115,8 @@ void Platform::requestOutputsChange(KWaylandServer::OutputConfigurationV2Interfa
props->vrrPolicy = static_cast<RenderLoop::VrrPolicy>(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<AbstractWaylandOutput*>(output);
if (!o) {
qCWarning(KWIN_CORE) << "Platform::requestOutputsChange should only be called for Wayland platforms!";