[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 128610] kscreensaver does not launch screensaver after x
From:       Stephan Kulow <coolo () kde ! org>
Date:       2006-06-04 12:42:35
Message-ID: 20060604124235.15155.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=128610         
coolo kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From coolo kde org  2006-06-04 14:42 -------
SVN commit 548008 by coolo:

tricky. we can't disable the X screensaver ourselves or 
we will think later some program disabled it. 
BUG: 128610


 M  +8 -4      lockeng.cc  
 M  +8 -3      xautolock.cc  


--- branches/KDE/3.5/kdebase/kdesktop/lockeng.cc #548007: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 );
 }
 
--- branches/KDE/3.5/kdebase/kdesktop/xautolock.cc #548007: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)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic