[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kdesktop/lock
From: Chris Howells <howells () kde ! org>
Date: 2004-11-15 21:43:52
Message-ID: 20041115214352.BF5FD9A1B () office ! kde ! org
[Download RAW message or body]
CVS commit by howells:
Fade to black before starting screensaver. It works, though it breaks "manipulate \
screen" screensavers. we can bitBlt() the original screen back after the fade, but \
then this means it goes back to full brightness for a second or two before starting \
the screensaver.
Also the fade animation isn't silky smooth.
I'm going to leave this in for a few days to get comments before reverting/fixing.
Any comments coolo? :)
CCBUG: 86683
~
M +13 -2 lockprocess.cc 1.46
M +2 -0 lockprocess.h 1.23
--- kdebase/kdesktop/lock/lockprocess.cc #1.45:1.46
@@ -34,4 +34,6 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
+#include <kpixmapeffect.h>
+#include <kpixmap.h>
#include <qframe.h>
@@ -733,4 +734,12 @@ bool LockProcess::startLock()
bool LockProcess::startHack()
{
+ mOriginal = QPixmap::grabWindow(winId());
+
+ for (double i = 0; i < 1.0; i = i + 0.08)
+ {
+ KPixmap pixmap = mOriginal;
+ KPixmapEffect::fade(pixmap, i, Qt::black);
+ bitBlt(this, 0, 0, &pixmap);
+ }
if (mSaverExec.isEmpty())
{
@@ -773,4 +783,5 @@ bool LockProcess::startHack()
setpriority(PRIO_PROCESS, mHackProc.pid(), mPriority);
#endif
+ //bitBlt(this, 0, 0, &mOriginal);
return true;
}
--- kdebase/kdesktop/lock/lockprocess.h #1.22:1.23
@@ -13,4 +13,5 @@
#include <kprocess.h>
+#include <kpixmap.h>
#include <qwidget.h>
@@ -125,4 +126,5 @@ private:
int mAutoLogoutTimeout;
bool mAutoLogout;
+ KPixmap mOriginal;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic