diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-22 21:41:57 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-04-25 03:25:19 +0200 |
commit | 0d94402df36d04300c23c08ecf3c99771313a43d (patch) | |
tree | 2b8310335e9967a32ab3bfd81232588538fdccfe /kdesktop/lock | |
parent | a70c7eba6b4bae9466f15e123f0ae4376dba501c (diff) | |
download | tdebase-0d94402df36d04300c23c08ecf3c99771313a43d.tar.gz tdebase-0d94402df36d04300c23c08ecf3c99771313a43d.zip |
Fix secondary thread termination
This resolves the remainder of Bug 1467
(part of the original commit)
(cherry picked from commit edf3004ec3bd7bf7d2d1c3074281ce22188f3e35)
Diffstat (limited to 'kdesktop/lock')
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 24 | ||||
-rw-r--r-- | kdesktop/lock/lockprocess.h | 1 |
2 files changed, 10 insertions, 15 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 0a97f1764..138a80bfd 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -362,16 +362,18 @@ void LockProcess::init(bool child, bool useBlankOnly) connect(&mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(suspend())); #ifdef HAVE_DPMS - if (mDPMSDepend) { + //if the user decided that the screensaver should run independent from + //dpms, we shouldn't check for it, aleXXX + if (KDesktopSettings::dpmsDependent()) { BOOL on; CARD16 state; - DPMSInfo(qt_xdisplay(), &state, &on); - if (on) - { - connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive())); - // we can save CPU if we stop it as quickly as possible - // but we waste CPU if we check too often -> so take 10s - mCheckDPMS.start(10000); + if (DPMSInfo(qt_xdisplay(), &state, &on)) { + if (on) { + connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive())); + // we can save CPU if we stop it as quickly as possible + // but we waste CPU if we check too often -> so take 10s + mCheckDPMS.start(10000); + } } } #endif @@ -836,12 +838,6 @@ void LockProcess::configure() mAutoLogoutTimerId = startTimer(mAutoLogoutTimeout * 1000); // in milliseconds } -#ifdef HAVE_DPMS - //if the user decided that the screensaver should run independent from - //dpms, we shouldn't check for it, aleXXX - mDPMSDepend = KDesktopSettings::dpmsDependent(); -#endif - mPriority = KDesktopSettings::priority(); if (mPriority < 0) mPriority = 0; if (mPriority > 19) mPriority = 19; diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h index 9cfffbf6d..e4c17eff9 100644 --- a/kdesktop/lock/lockprocess.h +++ b/kdesktop/lock/lockprocess.h @@ -151,7 +151,6 @@ private: bool mSuspended; TQTimer mSuspendTimer; bool mVisibility; - bool mDPMSDepend; TQTimer mCheckDPMS; TQValueStack< TQWidget* > mDialogs; bool mRestoreXF86Lock; |