Fallback to D-Bus methods if XCB-based LastUserInputTime failed

This commit is contained in:
Ilya Fedin 2020-10-04 06:02:15 +04:00 committed by John Preston
parent 983d9e6eee
commit 638ea3111f
1 changed files with 4 additions and 1 deletions

View File

@ -1013,7 +1013,10 @@ QImage GetImageFromClipboard() {
std::optional<crl::time> LastUserInputTime() {
if (!IsWayland()) {
return XCBLastUserInputTime();
const auto xcbResult = XCBLastUserInputTime();
if (xcbResult.has_value()) {
return xcbResult;
}
}
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION