summaryrefslogtreecommitdiffstats
path: root/src/tdepowersave.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2016-03-13 16:50:36 +0100
committerMichele Calgaro <michele.calgaro@yahoo.it>2016-03-13 16:50:36 +0100
commitd67bc99f08c6ba9113a769c45538ab3711cc1cfa (patch)
treea288b1a17230f7fa4a1e759d2455c2a43a4c984d /src/tdepowersave.cpp
parent2f0cf5202c83fe9d034dc3254e8db127f5bdffe3 (diff)
downloadtdepowersave-d67bc99f08c6ba9113a769c45538ab3711cc1cfa.tar.gz
tdepowersave-d67bc99f08c6ba9113a769c45538ab3711cc1cfa.zip
Fixed up timer for autosuspend and autodimm when a screensaver is also in use. This resolves bug 2603.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tdepowersave.cpp')
-rw-r--r--src/tdepowersave.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp
index 7737089..793d38c 100644
--- a/src/tdepowersave.cpp
+++ b/src/tdepowersave.cpp
@@ -59,8 +59,8 @@ tdepowersave::tdepowersave( bool force_acpi_check, bool trace_func ) : KSystemTr
display = new screen();
settings = new Settings();
- autoSuspend = new autosuspend();
- autoDimm = new autodimm();
+ autoSuspend = new autosuspend(display);
+ autoDimm = new autodimm(display);
hwinfo = new HardwareInfo();
suspend = hwinfo->getSuspendSupport();
@@ -1936,7 +1936,7 @@ void tdepowersave::setAutoSuspend( bool resumed ){
if (resumed) {
autoSuspend->stop();
delete autoSuspend;
- autoSuspend = new autosuspend();
+ autoSuspend = new autosuspend(display);
connect(autoSuspend, TQT_SIGNAL(inactivityTimeExpired()), this, TQT_SLOT(do_autosuspendWarn()));
}
@@ -1986,7 +1986,7 @@ void tdepowersave::setAutoDimm( bool resumed ){
// setup again
autoDimm->stop();
delete autoDimm;
- autoDimm = new autodimm();
+ autoDimm = new autodimm(display);
connect(autoDimm, TQT_SIGNAL(inactivityTimeExpired()), this, TQT_SLOT(do_downDimm()));
connect(autoDimm, TQT_SIGNAL(UserIsActiveAgain()), this, TQT_SLOT(do_upDimm()));
}