outputconfigurationstore: don't generate configs that disable all outputs

This commit is contained in:
Xaver Hugl 2023-11-21 18:38:05 +01:00
parent 3c25474b41
commit 017b4019b6

View file

@ -379,7 +379,7 @@ std::pair<OutputConfiguration, QList<Output *>> OutputConfigurationStore::genera
QPoint pos(0, 0);
for (const auto output : outputs) {
const auto outputIndex = findOutput(output, outputs);
const bool enable = !isLidClosed || !output->isInternal();
const bool enable = !isLidClosed || !output->isInternal() || outputs.size() == 1;
const OutputState existingData = outputIndex ? m_outputs[*outputIndex] : OutputState{};
const auto modes = output->modes();