From 2ac1e6ec5a97d3721a3d6513ea68e4e21da1d40b Mon Sep 17 00:00:00 2001 From: sandman Date: Tue, 06 Aug 2002 21:46:30 +0000 Subject: - Fix for the "iPAQ won't suspend until apm --suspend is called" problem - Improved the resume delay until the LCD backlight is on again --- (limited to 'core/launcher/desktop.cpp') 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() void Desktop::togglePower() { + extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop + static bool excllock = false; if ( excllock ) @@ -614,18 +616,20 @@ void Desktop::togglePower() bool wasloggedin = loggedin; loggedin=0; suspendTime = QDateTime::currentDateTime(); - darkScreen(); + + qpe_setBacklight ( 0 ); // force LCD off + if ( wasloggedin ) blankScreen(); ODevice::inst ( )-> suspend ( ); - QWSServer::screenSaverActivate( FALSE ); + QWSServer::screenSaverActivate ( false ); + + qpe_setBacklight ( -3 ); // force LCD on { QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep - QCopEnvelope e("QPE/System", "setBacklight(int)"); - e << -3; // Force on } if ( wasloggedin ) -- cgit v0.9.0.2