summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp40
-rw-r--r--core/launcher/desktop.h1
2 files changed, 10 insertions, 31 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 4640a12..68949e6 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -60,2 +60,4 @@
+using namespace Opie;
+
class QCopKeyRegister
@@ -179,3 +181,3 @@ public:
- setBacklight ( -1 );
+ setBacklight ( -3 );
}
@@ -321,4 +323,9 @@ void DesktopApplication::switchLCD ( bool on )
- if ( dapp-> m_screensaver )
- dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 );
+ if ( dapp-> m_screensaver ) {
+ if ( on )
+ dapp-> m_screensaver-> restore ( ); //setBacklight ( on ? -3 : -1 );
+ else
+ dapp-> m_screensaver-> save ( 1 );
+
+ }
}
@@ -1008,28 +1015 @@ void Desktop::soundAlarm()
-bool Desktop::eventFilter( QObject *, QEvent *ev )
-{
- if ( ev-> type ( ) == QEvent::KeyPress ) {
- QKeyEvent * ke = ( QKeyEvent * ) ev;
- if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key
- QWidget * active = qApp-> activeWindow ( );
-
- if ( active && active-> isPopup ( ) )
- active->close();
-
- /*
- * On iPAQ 38xx that key is not the "menu key" but the mail key
- * To not confuse the users, make it launch the mail app on 38xx
- */
- if ( ODevice::inst() ->model() == OMODEL_iPAQ_H38xx ) {
- QCopEnvelope e( "QPE/System", "execute(QString)" );
- e << QString( "mail" );
- return true;
- }
- else {
- raiseMenu ( );
- return true;
- }
- }
- }
- return false;
-}
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h
index b9ff39f..f7c3e3f 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -124,3 +124,2 @@ protected:
void timerEvent( QTimerEvent *e );
- bool eventFilter( QObject *, QEvent * );