summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
authorsandman <sandman>2002-10-17 00:39:31 (UTC)
committer sandman <sandman>2002-10-17 00:39:31 (UTC)
commit259d10f40405fd77ba0a8947782f716be94da3a5 (patch) (side-by-side diff)
tree636cb3a899d27a8fe41f377fabc5bd170a74c6dc /core/launcher/desktop.cpp
parent5d28c61d84da1814d356540b557bbfe026da98aa (diff)
downloadopie-259d10f40405fd77ba0a8947782f716be94da3a5.zip
opie-259d10f40405fd77ba0a8947782f716be94da3a5.tar.gz
opie-259d10f40405fd77ba0a8947782f716be94da3a5.tar.bz2
- fix for bug #292 (Improper behaviour of frontlight disabling)
- fix for bug #199 (Desktop visible on resume before password dialog appears)
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 0e60839..d74b745 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -181,7 +181,7 @@ public:
m_lcd_status = true;
}
- setBacklight ( -3 );
+ setBacklight ( -1 );
}
bool save( int level )
{
@@ -332,12 +332,14 @@ void DesktopApplication::switchLCD ( bool on )
DesktopApplication *dapp = (DesktopApplication *) qApp;
if ( dapp-> m_screensaver ) {
- if ( on )
- dapp-> m_screensaver-> restore ( ); //setBacklight ( on ? -3 : -1 );
- else
- dapp-> m_screensaver-> save ( 1 );
-
- }
+ if ( on ) {
+ dapp-> m_screensaver-> setDisplayState ( true );
+ dapp-> m_screensaver-> setBacklight ( -3 );
+ }
+ else {
+ dapp-> m_screensaver-> setDisplayState ( false );
+ }
+ }
}
}
@@ -862,7 +864,7 @@ void Desktop::togglePower()
qDebug ( "togglePower (locked == %d)", excllock ? 1 : 0 );
if ( excllock )
- return ;
+ return;
excllock = true;
@@ -870,17 +872,27 @@ void Desktop::togglePower()
loggedin = 0;
suspendTime = QDateTime::currentDateTime();
- ODevice::inst ( ) -> suspend ( );
+#ifdef QWS
+ if ( Password::needToAuthenticate ( true ) && qt_screen ) {
+ // Should use a big black window instead.
+ // But this would not show up fast enough
+ QGfx *g = qt_screen-> screenGfx ( );
+ g-> fillRect ( 0, 0, qt_screen-> width ( ), qt_screen-> height ( ));
+ delete g;
+ }
+#endif
+
+ ODevice::inst ( )-> suspend ( );
- QWSServer::screenSaverActivate ( false );
DesktopApplication::switchLCD ( true ); // force LCD on without slow qcop call
+ QWSServer::screenSaverActivate ( false );
{
QCopEnvelope( "QPE/Card", "mtabChanged()" ); // might have changed while asleep
}
if ( wasloggedin )
- login( TRUE );
+ login ( true );
execAutoStart();
//qcopBridge->closeOpenConnections();