Commit b7d7a99f authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: fix placeholder output check

Non-desktop outputs must be ignored
parent e67e9b6e
Pipeline #209145 passed with stage
in 35 minutes and 19 seconds
......@@ -537,14 +537,17 @@ void DrmBackend::enableOutput(DrmAbstractOutput *output, bool enable)
m_enabledOutputs << output;
Q_EMIT outputEnabled(output);
checkOutputsAreOn();
if (m_placeHolderOutput) {
if (m_placeHolderOutput && !output->isNonDesktop()) {
qCDebug(KWIN_DRM) << "removing placeholder output";
primaryGpu()->removeVirtualOutput(m_placeHolderOutput);
m_placeHolderOutput = nullptr;
m_placeholderFilter.reset();
}
} else {
if (m_enabledOutputs.count() == 1 && !kwinApp()->isTerminating()) {
int normalOutputsCount = std::count_if(m_enabledOutputs.begin(), m_enabledOutputs.end(), [](const auto output) {
return !output->isNonDesktop();
});
if (normalOutputsCount == 1 && !output->isNonDesktop() && !kwinApp()->isTerminating()) {
qCDebug(KWIN_DRM) << "adding placeholder output";
m_placeHolderOutput = primaryGpu()->createVirtualOutput({}, m_enabledOutputs.constFirst()->pixelSize(), 1, DrmVirtualOutput::Type::Placeholder);
// placeholder doesn't actually need to render anything
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment