-rw-r--r-- | core/launcher/desktop.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index d74b745..1fd3f6a 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -149,13 +149,12 @@ void DesktopPowerAlerter::hideEvent( QHideEvent *e ) | |||
149 | { | 149 | { |
150 | QMessageBox::hideEvent( e ); | 150 | QMessageBox::hideEvent( e ); |
151 | alertCount = 0; | 151 | alertCount = 0; |
152 | currentPriority = INT_MAX; | 152 | currentPriority = INT_MAX; |
153 | } | 153 | } |
154 | 154 | ||
155 | |||
156 | class QPEScreenSaver : public QWSScreenSaver | 155 | class QPEScreenSaver : public QWSScreenSaver |
157 | { | 156 | { |
158 | private: | 157 | private: |
159 | int LcdOn; | 158 | int LcdOn; |
160 | 159 | ||
161 | public: | 160 | public: |
@@ -322,13 +321,12 @@ private: | |||
322 | bool m_lcd_status; | 321 | bool m_lcd_status; |
323 | 322 | ||
324 | int m_backlight_bright; | 323 | int m_backlight_bright; |
325 | bool m_backlight_forcedoff; | 324 | bool m_backlight_forcedoff; |
326 | }; | 325 | }; |
327 | 326 | ||
328 | |||
329 | void DesktopApplication::switchLCD ( bool on ) | 327 | void DesktopApplication::switchLCD ( bool on ) |
330 | { | 328 | { |
331 | if ( qApp ) { | 329 | if ( qApp ) { |
332 | DesktopApplication *dapp = (DesktopApplication *) qApp; | 330 | DesktopApplication *dapp = (DesktopApplication *) qApp; |
333 | 331 | ||
334 | if ( dapp-> m_screensaver ) { | 332 | if ( dapp-> m_screensaver ) { |
@@ -639,13 +637,13 @@ Desktop::Desktop() : | |||
639 | rereadVolumes(); | 637 | rereadVolumes(); |
640 | 638 | ||
641 | packageSlave = new PackageSlave( this ); | 639 | packageSlave = new PackageSlave( this ); |
642 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); | 640 | connect( qApp, SIGNAL( volumeChanged( bool ) ), this, SLOT( rereadVolumes() ) ); |
643 | 641 | ||
644 | qApp->installEventFilter( this ); | 642 | qApp->installEventFilter( this ); |
645 | 643 | ||
646 | qApp-> setMainWidget ( launcher ); | 644 | qApp-> setMainWidget ( launcher ); |
647 | } | 645 | } |
648 | 646 | ||
649 | void Desktop::show() | 647 | void Desktop::show() |
650 | { | 648 | { |
651 | login( TRUE ); | 649 | login( TRUE ); |
@@ -706,29 +704,33 @@ void Desktop::checkMemory() | |||
706 | existingMessage = FALSE; | 704 | existingMessage = FALSE; |
707 | #endif | 705 | #endif |
708 | } | 706 | } |
709 | 707 | ||
710 | static bool isVisibleWindow( int wid ) | 708 | static bool isVisibleWindow( int wid ) |
711 | { | 709 | { |
710 | #ifdef QWS | ||
712 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 711 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
713 | QWSWindow* w; | 712 | QWSWindow* w; |
714 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { | 713 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { |
715 | if ( w->winId() == wid ) | 714 | if ( w->winId() == wid ) |
716 | return !w->isFullyObscured(); | 715 | return !w->isFullyObscured(); |
717 | } | 716 | } |
717 | #endif | ||
718 | return FALSE; | 718 | return FALSE; |
719 | } | 719 | } |
720 | 720 | ||
721 | static bool hasVisibleWindow( const QString& clientname ) | 721 | static bool hasVisibleWindow( const QString& clientname ) |
722 | { | 722 | { |
723 | #ifdef QWS | ||
723 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 724 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
724 | QWSWindow* w; | 725 | QWSWindow* w; |
725 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { | 726 | for ( QListIterator<QWSWindow> it( list ); ( w = it.current() ); ++it ) { |
726 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) | 727 | if ( w->client() ->identity() == clientname && !w->isFullyObscured() ) |
727 | return TRUE; | 728 | return TRUE; |
728 | } | 729 | } |
730 | #endif | ||
729 | return FALSE; | 731 | return FALSE; |
730 | } | 732 | } |
731 | 733 | ||
732 | void Desktop::raiseLauncher() | 734 | void Desktop::raiseLauncher() |
733 | { | 735 | { |
734 | Config cfg( "qpe" ); //F12 'Home' | 736 | Config cfg( "qpe" ); //F12 'Home' |
@@ -742,13 +744,13 @@ void Desktop::raiseLauncher() | |||
742 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | 744 | QCopEnvelope e( "QPE/System", "execute(QString)" ); |
743 | e << tempItem; | 745 | e << tempItem; |
744 | } | 746 | } |
745 | } | 747 | } |
746 | 748 | ||
747 | void Desktop::home ( ) | 749 | void Desktop::home ( ) |
748 | { | 750 | { |
749 | if ( isVisibleWindow( launcher->winId() ) ) | 751 | if ( isVisibleWindow( launcher->winId() ) ) |
750 | launcher->nextView(); | 752 | launcher->nextView(); |
751 | else | 753 | else |
752 | launcher->raise(); | 754 | launcher->raise(); |
753 | } | 755 | } |
754 | 756 | ||