|
|
@ -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;
|
|
|
|