author | harlekin <harlekin> | 2002-03-19 01:25:52 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-03-19 01:25:52 (UTC) |
commit | 7c64492d86e8ddc90e80c380d53e2744869397cf (patch) (unidiff) | |
tree | 430e49fa104ffdacdb56e817cb48ccf6002550f9 | |
parent | 3698b59946936e76687850fde92c45989320e7b0 (diff) | |
download | opie-7c64492d86e8ddc90e80c380d53e2744869397cf.zip opie-7c64492d86e8ddc90e80c380d53e2744869397cf.tar.gz opie-7c64492d86e8ddc90e80c380d53e2744869397cf.tar.bz2 |
again
-rw-r--r-- | core/launcher/desktop.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 547daa9..64043e7 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -528,76 +528,76 @@ void Desktop::execAutoStart() | |||
528 | #endif | 528 | #endif |
529 | 529 | ||
530 | static bool blanked=FALSE; | 530 | static bool blanked=FALSE; |
531 | 531 | ||
532 | static void blankScreen() | 532 | static void blankScreen() |
533 | { | 533 | { |
534 | if ( !qt_screen ) return; | 534 | if ( !qt_screen ) return; |
535 | /* Should use a big black window instead. | 535 | /* Should use a big black window instead. |
536 | QGfx* g = qt_screen->screenGfx(); | 536 | QGfx* g = qt_screen->screenGfx(); |
537 | g->fillRect(0,0,qt_screen->width(),qt_screen->height()); | 537 | g->fillRect(0,0,qt_screen->width(),qt_screen->height()); |
538 | delete g; | 538 | delete g; |
539 | */ | 539 | */ |
540 | blanked = TRUE; | 540 | blanked = TRUE; |
541 | } | 541 | } |
542 | 542 | ||
543 | static void darkScreen() | 543 | static void darkScreen() |
544 | { | 544 | { |
545 | extern void qpe_setBacklight(int); | 545 | extern void qpe_setBacklight(int); |
546 | qpe_setBacklight(0); // force off | 546 | qpe_setBacklight(0); // force off |
547 | } | 547 | } |
548 | 548 | ||
549 | 549 | ||
550 | void Desktop::togglePower() | 550 | void Desktop::togglePower() |
551 | { | 551 | { |
552 | bool wasloggedin = loggedin; | 552 | bool wasloggedin = loggedin; |
553 | loggedin=0; | 553 | loggedin=0; |
554 | darkScreen(); | 554 | darkScreen(); |
555 | if ( wasloggedin ) | 555 | if ( wasloggedin ) |
556 | blankScreen(); | 556 | blankScreen(); |
557 | 557 | ||
558 | system("apm --suspend"); | 558 | system("apm --suspend"); |
559 | 559 | ||
560 | sleep(2); | 560 | |
561 | 561 | ||
562 | QWSServer::screenSaverActivate( FALSE ); | 562 | QWSServer::screenSaverActivate( FALSE ); |
563 | { | 563 | { |
564 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep | 564 | QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep |
565 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 565 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
566 | e << -3; // Force on | 566 | e << -3; // Force on |
567 | } | 567 | } |
568 | if ( wasloggedin ) { | 568 | if ( wasloggedin ) { |
569 | login(TRUE); | 569 | login(TRUE); |
570 | } | 570 | } |
571 | 571 | sleep(1); | |
572 | execAutoStart(); | 572 | execAutoStart(); |
573 | //qcopBridge->closeOpenConnections(); | 573 | //qcopBridge->closeOpenConnections(); |
574 | //qDebug("called togglePower()!!!!!!"); | 574 | //qDebug("called togglePower()!!!!!!"); |
575 | } | 575 | } |
576 | 576 | ||
577 | void Desktop::toggleLight() | 577 | void Desktop::toggleLight() |
578 | { | 578 | { |
579 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 579 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
580 | e << -2; // toggle | 580 | e << -2; // toggle |
581 | } | 581 | } |
582 | 582 | ||
583 | void Desktop::toggleSymbolInput() | 583 | void Desktop::toggleSymbolInput() |
584 | { | 584 | { |
585 | tb->toggleSymbolInput(); | 585 | tb->toggleSymbolInput(); |
586 | } | 586 | } |
587 | 587 | ||
588 | void Desktop::toggleNumLockState() | 588 | void Desktop::toggleNumLockState() |
589 | { | 589 | { |
590 | tb->toggleNumLockState(); | 590 | tb->toggleNumLockState(); |
591 | } | 591 | } |
592 | 592 | ||
593 | void Desktop::toggleCapsLockState() | 593 | void Desktop::toggleCapsLockState() |
594 | { | 594 | { |
595 | tb->toggleCapsLockState(); | 595 | tb->toggleCapsLockState(); |
596 | } | 596 | } |
597 | 597 | ||
598 | void Desktop::styleChange( QStyle &s ) | 598 | void Desktop::styleChange( QStyle &s ) |
599 | { | 599 | { |
600 | QWidget::styleChange( s ); | 600 | QWidget::styleChange( s ); |
601 | int displayw = qApp->desktop()->width(); | 601 | int displayw = qApp->desktop()->width(); |
602 | int displayh = qApp->desktop()->height(); | 602 | int displayh = qApp->desktop()->height(); |
603 | 603 | ||