summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Unidiff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 7f24259..552c7c3 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -604,6 +604,8 @@ static void darkScreen()
604 604
605void Desktop::togglePower() 605void Desktop::togglePower()
606{ 606{
607 extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop
608
607 static bool excllock = false; 609 static bool excllock = false;
608 610
609 if ( excllock ) 611 if ( excllock )
@@ -614,18 +616,20 @@ void Desktop::togglePower()
614 bool wasloggedin = loggedin; 616 bool wasloggedin = loggedin;
615 loggedin=0; 617 loggedin=0;
616 suspendTime = QDateTime::currentDateTime(); 618 suspendTime = QDateTime::currentDateTime();
617 darkScreen(); 619
620 qpe_setBacklight ( 0 ); // force LCD off
621
618 if ( wasloggedin ) 622 if ( wasloggedin )
619 blankScreen(); 623 blankScreen();
620 624
621 ODevice::inst ( )-> suspend ( ); 625 ODevice::inst ( )-> suspend ( );
622 626
623 QWSServer::screenSaverActivate( FALSE ); 627 QWSServer::screenSaverActivate ( false );
628
629 qpe_setBacklight ( -3 ); // force LCD on
624 630
625 { 631 {
626 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep 632 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep
627 QCopEnvelope e("QPE/System", "setBacklight(int)");
628 e << -3; // Force on
629 } 633 }
630 634
631 if ( wasloggedin ) 635 if ( wasloggedin )