workspace: match KScreen when computing the hash without an edid

This commit is contained in:
Xaver Hugl 2022-12-13 16:14:22 +01:00 committed by David Edmundson
parent 892393ffa1
commit 3c2f0e626b

View file

@ -519,13 +519,13 @@ namespace KWinKScreenIntegration
/// See KScreen::Output::hashMd5
QString outputHash(Output *output)
{
QCryptographicHash hash(QCryptographicHash::Md5);
if (!output->edid().isEmpty()) {
QCryptographicHash hash(QCryptographicHash::Md5);
hash.addData(output->edid());
return QString::fromLatin1(hash.result().toHex());
} else {
hash.addData(output->name().toLatin1());
return output->name();
}
return QString::fromLatin1(hash.result().toHex());
}
/// See KScreen::Config::connectedOutputsHash in libkscreen