fix: let inhibitScreenCall succeed when nothing was inhibited
This commit is contained in:
parent
e212d4e71a
commit
58a6736667
1 changed files with 2 additions and 2 deletions
|
|
@ -84,8 +84,8 @@ bool XDGPowerManager::inhibitScreenCall(InhibitScreenServices serviceID, bool st
|
||||||
cookies[serviceNum] = reply.value();
|
cookies[serviceNum] = reply.value();
|
||||||
} else {
|
} else {
|
||||||
if (!cookies[serviceNum]) {
|
if (!cookies[serviceNum]) {
|
||||||
error = "cookies are empty";
|
// Nothing was ever inhibited for this service
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
reply = screenSaverInterface.call("UnInhibit", cookies[serviceNum]);
|
reply = screenSaverInterface.call("UnInhibit", cookies[serviceNum]);
|
||||||
cookies[serviceNum] = 0;
|
cookies[serviceNum] = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue