Commit f1393bc8 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix missing "Switch User" button on lockscreen with systemd 246

With newer systemd versions (since 246), getting the "CanMultiSession" property
doesn't work anymore.

It's hidden and always true, see https://github.com/systemd/systemd/commit/8f8cc84ba4612e74cd1e26898c6816e6e60fc4e9
and https://github.com/systemd/systemd/commit/c2b178d3cacad52eadc30ecc349160bc02d32a9c

So let's just assume that it's supported if the property is invalid.

BUG: 427777
FIXED-IN: 5.20.3
parent b693f482
......@@ -622,6 +622,14 @@ KDisplayManager::isSwitchable()
QVariant prop = SDseat.property("CanMultiSession");
if (prop.isValid())
return prop.toBool();
else {
// Newer systemd versions (since 246) don't expose "CanMultiSession" anymore.
// It's hidden and always true.
// See https://github.com/systemd/systemd/commit/8f8cc84ba4612e74cd1e26898c6816e6e60fc4e9
// and https://github.com/systemd/systemd/commit/c2b178d3cacad52eadc30ecc349160bc02d32a9c
// So assume that it's supported if the property is invalid.
return true;
}
}
CKSeat CKseat(currentSeat);
if (CKseat.isValid()) {
......
Markdown is supported
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