1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

Fix KDE Bug 128610 (kscreensaver does not launch screensaver after x minutes).

This commit is contained in:
Michael Nottebrock 2006-07-05 23:22:17 +00:00
parent 7aa4037987
commit b0311988f6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=167021
14 changed files with 686 additions and 7 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}

View File

@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src

View File

@ -0,0 +1,97 @@
--- kdesktop/xautolock.cc 2006/05/18 13:18:28 542149
+++ kdesktop/xautolock.cc 2006/06/04 12:42:03 548008
@@ -192,6 +192,7 @@
bool activate = false;
+ kdDebug() << now << " " << mTrigger << endl;
if (now >= mTrigger)
{
resetTrigger();
@@ -202,6 +203,8 @@
BOOL on;
CARD16 state;
DPMSInfo( qt_xdisplay(), &state, &on );
+
+ kdDebug() << "DPMSInfo " << state << " " << on << endl;
// If DPMS is active, it makes XScreenSaverQueryInfo() report idle time
// that is always smaller than DPMS timeout (X bug I guess). So if DPMS
// saving is active, simply always activate our saving too, otherwise
@@ -217,9 +220,11 @@
#ifdef HAVE_XSCREENSAVER
static XScreenSaverInfo* mitInfo = 0;
if (!mitInfo) mitInfo = XScreenSaverAllocInfo ();
- XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo);
- if (mitInfo->state == ScreenSaverDisabled)
- activate = false;
+ if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) {
+ kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl;
+ if (mitInfo->state == ScreenSaverDisabled)
+ activate = false;
+ }
#endif
if(mActive && activate)
--- kdesktop/lockeng.cc 2006/02/06 13:25:11 506297
+++ kdesktop/lockeng.cc 2006/06/04 12:42:03 548008
@@ -42,9 +42,6 @@
XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval,
&mXBlanking, &mXExposures);
- // We'll handle blanking
- XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
-
mState = Waiting;
mXAutoLock = 0;
mEnabled = false;
@@ -158,6 +155,9 @@
mXAutoLock->setDPMS(mDPMS);
//mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight);
+ // We'll handle blanking
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
+
mXAutoLock->start();
kdDebug(1204) << "Saver Engine started, timeout: " << mTimeout << endl;
@@ -170,6 +170,7 @@
mXAutoLock = 0;
}
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
kdDebug(1204) << "Saver Engine disabled" << endl;
}
@@ -291,7 +292,6 @@
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
-
mLockProcess.kill();
if (mXAutoLock)
@@ -300,6 +300,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
void SaverEngine::lockProcessExited()
@@ -314,6 +315,7 @@
}
processLockTransactions();
mState = Waiting;
+ XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, mXBlanking, mXExposures);
}
//---------------------------------------------------------------------------
@@ -322,6 +324,8 @@
//
void SaverEngine::idleTimeout()
{
+ // disable X screensaver
+ XSetScreenSaver(qt_xdisplay(), 0, mXInterval, mXBlanking, mXExposures);
startLockProcess( DefaultLock );
}