summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tderootsystemdevice.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-05-02 23:34:35 +1000
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-05-02 23:34:35 +1000
commit92394e2850e50efa0f3334ef3526421befe33072 (patch)
treec166efd9d3b0a5828b6afe555c57952e90e34a1b /tdecore/tdehw/tderootsystemdevice.cpp
parenta29712773b22aee0b5fefb3cc4b87499baa8db01 (diff)
downloadtdelibs-92394e2850e50efa0f3334ef3526421befe33072.tar.gz
tdelibs-92394e2850e50efa0f3334ef3526421befe33072.zip
tdecore: Improved code for hybrid suspend (aka suspend to RAM + suspend to disk).
Now code is more consistent. This relates to bug 2601. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tdehw/tderootsystemdevice.cpp')
-rw-r--r--tdecore/tdehw/tderootsystemdevice.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tdecore/tdehw/tderootsystemdevice.cpp b/tdecore/tdehw/tderootsystemdevice.cpp
index 7ced4a279..37154126f 100644
--- a/tdecore/tdehw/tderootsystemdevice.cpp
+++ b/tdecore/tdehw/tderootsystemdevice.cpp
@@ -300,8 +300,7 @@ bool TDERootSystemDevice::canHibernate() {
int state_rval = access (statenode.ascii(), W_OK);
int disk_rval = access (disknode.ascii(), W_OK);
if (state_rval == 0 && disk_rval == 0) {
- if (powerStates().contains(TDESystemPowerState::Hibernate) &&
- hibernationMethods().contains(TDESystemHibernationMethod::Platform)) {
+ if (powerStates().contains(TDESystemPowerState::Hibernate)) {
return TRUE;
}
else {
@@ -416,8 +415,7 @@ bool TDERootSystemDevice::canHybridSuspend() {
int state_rval = access (statenode.ascii(), W_OK);
int disk_rval = access (disknode.ascii(), W_OK);
if (state_rval == 0 && disk_rval == 0) {
- if (powerStates().contains(TDESystemPowerState::Hibernate) &&
- hibernationMethods().contains(TDESystemHibernationMethod::Suspend)) {
+ if (powerStates().contains(TDESystemPowerState::HybridSuspend)) {
return TRUE;
}
else {