summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-03-11 19:51:33 (UTC)
committer harlekin <harlekin>2002-03-11 19:51:33 (UTC)
commitf1c93c0eb0d9599b0f5e0c0406defc2f2f6c6988 (patch) (side-by-side diff)
tree39137a365e373fe3f50932b118308b20faf9ca08
parent0f81c8354840d1c8e54e3b083d965e1b2489bb36 (diff)
downloadopie-f1c93c0eb0d9599b0f5e0c0406defc2f2f6c6988.zip
opie-f1c93c0eb0d9599b0f5e0c0406defc2f2f6c6988.tar.gz
opie-f1c93c0eb0d9599b0f5e0c0406defc2f2f6c6988.tar.bz2
now opie grabs the powerkey on ipaq too, not only zaurus
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index da535d9..680cc06 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -218,48 +218,52 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
return TRUE;
}
/* menu key now opens application menu/toolbar
if ( ke->simpleData.keycode == Key_F11 ) {
if ( press ) emit menu();
return TRUE;
}
*/
if ( ke->simpleData.keycode == Key_F12 ) {
while( activePopupWidget() )
activePopupWidget()->close();
if ( press ) emit launch();
return TRUE;
}
if ( ke->simpleData.keycode == Key_F13 ) {
if ( press ) emit email();
return TRUE;
}
}
if ( ke->simpleData.keycode == Key_F34 ) {
if ( press ) emit power();
return TRUE;
}
+ if ( ke->simpleData.keycode == Key_SysReq ) {
+ if ( press ) emit power();
+ return TRUE;
+ }
if ( ke->simpleData.keycode == Key_F35 ) {
if ( press ) emit backlight();
return TRUE;
}
if ( ke->simpleData.keycode == Key_F32 ) {
if ( press ) QCopEnvelope e( "QPE/Desktop", "startSync()" );
return TRUE;
}
if ( ke->simpleData.keycode == Key_F31 && !ke->simpleData.modifiers ) {
if ( press ) emit symbol();
return TRUE;
}
if ( ke->simpleData.keycode == Key_NumLock ) {
if ( press ) emit numLockStateToggle();
}
if ( ke->simpleData.keycode == Key_CapsLock ) {
if ( press ) emit capsLockStateToggle();
}
if ( press )
qpedesktop->keyClick();
} else {
if ( e->type == QWSEvent::Mouse ) {
QWSMouseEvent *me = (QWSMouseEvent *)e;
static bool up = TRUE;
@@ -531,59 +535,59 @@ static void blankScreen()
/* Should use a big black window instead.
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");
- execAutoStart();
+
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();
}