Fix secondary thread termination

This resolves the remainder of Bug 1467
(part of the original commit)
(cherry picked from commit edf3004ec3)
v3.5.13-sru
Timothy Pearson 12 years ago committed by Slávek Banko
parent a70c7eba6b
commit 0d94402df3

@ -362,18 +362,20 @@ void LockProcess::init(bool child, bool useBlankOnly)
connect(&mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(suspend())); connect(&mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(suspend()));
#ifdef HAVE_DPMS #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; BOOL on;
CARD16 state; CARD16 state;
DPMSInfo(qt_xdisplay(), &state, &on); if (DPMSInfo(qt_xdisplay(), &state, &on)) {
if (on) if (on) {
{
connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive())); connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive()));
// we can save CPU if we stop it as quickly as possible // we can save CPU if we stop it as quickly as possible
// but we waste CPU if we check too often -> so take 10s // but we waste CPU if we check too often -> so take 10s
mCheckDPMS.start(10000); mCheckDPMS.start(10000);
} }
} }
}
#endif #endif
#if (QT_VERSION-0 >= 0x030200) // XRANDR support #if (QT_VERSION-0 >= 0x030200) // XRANDR support
@ -836,12 +838,6 @@ void LockProcess::configure()
mAutoLogoutTimerId = startTimer(mAutoLogoutTimeout * 1000); // in milliseconds 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(); mPriority = KDesktopSettings::priority();
if (mPriority < 0) mPriority = 0; if (mPriority < 0) mPriority = 0;
if (mPriority > 19) mPriority = 19; if (mPriority > 19) mPriority = 19;

@ -151,7 +151,6 @@ private:
bool mSuspended; bool mSuspended;
TQTimer mSuspendTimer; TQTimer mSuspendTimer;
bool mVisibility; bool mVisibility;
bool mDPMSDepend;
TQTimer mCheckDPMS; TQTimer mCheckDPMS;
TQValueStack< TQWidget* > mDialogs; TQValueStack< TQWidget* > mDialogs;
bool mRestoreXF86Lock; bool mRestoreXF86Lock;

Loading…
Cancel
Save