Fix mishandling of output configuration if output monitor EDID is missing
This functionally fixes * duplication of output configuration in ~/.config/kwinoutputconfig.json * _wrong_ ouput configuration - in particular the scale - being restored (i.e. scale would never be restored)
This commit is contained in:
parent
cffacc514d
commit
d563bc6c86
1 changed files with 6 additions and 4 deletions
|
@ -137,10 +137,12 @@ std::optional<size_t> OutputConfigurationStore::findOutput(Output *output, const
|
|||
return otherOutput != output && otherOutput->edid().identifier() == output->edid().identifier() && otherOutput->mstPath() == output->mstPath();
|
||||
});
|
||||
const auto it = std::find_if(m_outputs.begin(), m_outputs.end(), [uniqueEdid, uniqueMst, output](const auto &outputState) {
|
||||
if (outputState.edidIdentifier != output->edid().identifier()) {
|
||||
return false;
|
||||
} else if (uniqueEdid) {
|
||||
return true;
|
||||
if (output->edid().isValid()) {
|
||||
if (outputState.edidIdentifier != output->edid().identifier()) {
|
||||
return false;
|
||||
} else if (uniqueEdid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (outputState.mstPath != output->mstPath()) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue