summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 0c421e3..8369f54 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -653,13 +653,13 @@ bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress,
653 653
654bool Zaurus::suspend() { 654bool Zaurus::suspend() {
655 if ( !isQWS( ) ) // only qwsserver is allowed to suspend 655 if ( !isQWS( ) ) // only qwsserver is allowed to suspend
656 return false; 656 return false;
657 657
658 bool res = false; 658 bool res = false;
659 OAbstractMobileDevice::sendSuspendmsg(); 659 QCopEnvelope( "QPE/System", "aboutToSuspend()" );
660 660
661 struct timeval tvs, tvn; 661 struct timeval tvs, tvn;
662 ::gettimeofday ( &tvs, 0 ); 662 ::gettimeofday ( &tvs, 0 );
663 663
664 ::sync(); // flush fs caches 664 ::sync(); // flush fs caches
665 res = ( ::system ( "apm --suspend" ) == 0 ); 665 res = ( ::system ( "apm --suspend" ) == 0 );
@@ -673,8 +673,10 @@ bool Zaurus::suspend() {
673 do { // wait at most 1.5 sec: either suspend didn't work or the device resumed 673 do { // wait at most 1.5 sec: either suspend didn't work or the device resumed
674 ::usleep ( 200 * 1000 ); 674 ::usleep ( 200 * 1000 );
675 ::gettimeofday ( &tvn, 0 ); 675 ::gettimeofday ( &tvn, 0 );
676 } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut ); 676 } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < m_timeOut );
677 } 677 }
678 678
679 QCopEnvelope( "QPE/System", "returnFromSuspend()" );
680
679 return res; 681 return res;
680} 682}