author | harlekin <harlekin> | 2002-03-18 21:28:36 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-18 21:28:36 (UTC) |
commit | d41e6d2ed4caeabf78ab08bde7d4f5866c9eeb04 (patch) (side-by-side diff) | |
tree | ed3c5c8d2eea0001b954a34ecb4a496fa9a6a484 /core | |
parent | e6d3c651634eee7ff54675cc060ae94bd3ef41bd (diff) | |
download | opie-d41e6d2ed4caeabf78ab08bde7d4f5866c9eeb04.zip opie-d41e6d2ed4caeabf78ab08bde7d4f5866c9eeb04.tar.gz opie-d41e6d2ed4caeabf78ab08bde7d4f5866c9eeb04.tar.bz2 |
tweaked the suspend code a bit, maybe with a delay it works better
-rw-r--r-- | core/launcher/desktop.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 680cc06..547daa9 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -536,57 +536,60 @@ static void blankScreen() QGfx* g = qt_screen->screenGfx(); g->fillRect(0,0,qt_screen->width(),qt_screen->height()); delete g; */ blanked = TRUE; } static void darkScreen() { extern void qpe_setBacklight(int); qpe_setBacklight(0); // force off } void Desktop::togglePower() { bool wasloggedin = loggedin; loggedin=0; darkScreen(); if ( wasloggedin ) blankScreen(); system("apm --suspend"); + sleep(2); + QWSServer::screenSaverActivate( FALSE ); { QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep QCopEnvelope e("QPE/System", "setBacklight(int)"); e << -3; // Force on } if ( wasloggedin ) { login(TRUE); } + execAutoStart(); //qcopBridge->closeOpenConnections(); //qDebug("called togglePower()!!!!!!"); } void Desktop::toggleLight() { QCopEnvelope e("QPE/System", "setBacklight(int)"); e << -2; // toggle } void Desktop::toggleSymbolInput() { tb->toggleSymbolInput(); } void Desktop::toggleNumLockState() { tb->toggleNumLockState(); } void Desktop::toggleCapsLockState() { tb->toggleCapsLockState(); |