author | sandman <sandman> | 2002-08-06 21:46:30 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-08-06 21:46:30 (UTC) |
commit | 2ac1e6ec5a97d3721a3d6513ea68e4e21da1d40b (patch) (unidiff) | |
tree | ad84f4e405da51a6ca14ab4dd33bfd7c9f2a411e | |
parent | 8084d002de5e310491eec7fac0713ef29d0cf30f (diff) | |
download | opie-2ac1e6ec5a97d3721a3d6513ea68e4e21da1d40b.zip opie-2ac1e6ec5a97d3721a3d6513ea68e4e21da1d40b.tar.gz opie-2ac1e6ec5a97d3721a3d6513ea68e4e21da1d40b.tar.bz2 |
- Fix for the "iPAQ won't suspend until apm --suspend is called" problem
- Improved the resume delay until the LCD backlight is on again
-rw-r--r-- | core/launcher/desktop.cpp | 12 | ||||
-rw-r--r-- | libopie/odevice.cpp | 4 |
2 files changed, 11 insertions, 5 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 | |||
@@ -606,2 +606,4 @@ void 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; |
@@ -616,3 +618,5 @@ void Desktop::togglePower() | |||
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 ) |
@@ -622,3 +626,5 @@ void Desktop::togglePower() | |||
622 | 626 | ||
623 | QWSServer::screenSaverActivate( FALSE ); | 627 | QWSServer::screenSaverActivate ( false ); |
628 | |||
629 | qpe_setBacklight ( -3 ); // force LCD on | ||
624 | 630 | ||
@@ -626,4 +632,2 @@ void Desktop::togglePower() | |||
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 | } |
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 057c344..bf64676 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -308,3 +308,4 @@ bool ODeviceIPAQ::suspend ( ) | |||
308 | 308 | ||
309 | if (( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) { | 309 | if ((( fd = ::open ( "/dev/apm_bios", O_RDWR )) >= 0 ) || |
310 | (( fd = ::open ( "/dev/misc/apm_bios",O_RDWR )) >= 0 )) { | ||
310 | struct timeval tvs, tvn; | 311 | struct timeval tvs, tvn; |
@@ -330,2 +331,3 @@ bool ODeviceIPAQ::suspend ( ) | |||
330 | } | 331 | } |
332 | |||
331 | return res; | 333 | return res; |