summaryrefslogtreecommitdiff
Unidiff
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
@@ -226,32 +226,36 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
226 if ( ke->simpleData.keycode == Key_F12 ) { 226 if ( ke->simpleData.keycode == Key_F12 ) {
227 while( activePopupWidget() ) 227 while( activePopupWidget() )
228 activePopupWidget()->close(); 228 activePopupWidget()->close();
229 if ( press ) emit launch(); 229 if ( press ) emit launch();
230 return TRUE; 230 return TRUE;
231 } 231 }
232 if ( ke->simpleData.keycode == Key_F13 ) { 232 if ( ke->simpleData.keycode == Key_F13 ) {
233 if ( press ) emit email(); 233 if ( press ) emit email();
234 return TRUE; 234 return TRUE;
235 } 235 }
236 } 236 }
237 237
238 if ( ke->simpleData.keycode == Key_F34 ) { 238 if ( ke->simpleData.keycode == Key_F34 ) {
239 if ( press ) emit power(); 239 if ( press ) emit power();
240 return TRUE; 240 return TRUE;
241 } 241 }
242 if ( ke->simpleData.keycode == Key_SysReq ) {
243 if ( press ) emit power();
244 return TRUE;
245 }
242 if ( ke->simpleData.keycode == Key_F35 ) { 246 if ( ke->simpleData.keycode == Key_F35 ) {
243 if ( press ) emit backlight(); 247 if ( press ) emit backlight();
244 return TRUE; 248 return TRUE;
245 } 249 }
246 if ( ke->simpleData.keycode == Key_F32 ) { 250 if ( ke->simpleData.keycode == Key_F32 ) {
247 if ( press ) QCopEnvelope e( "QPE/Desktop", "startSync()" ); 251 if ( press ) QCopEnvelope e( "QPE/Desktop", "startSync()" );
248 return TRUE; 252 return TRUE;
249 } 253 }
250 if ( ke->simpleData.keycode == Key_F31 && !ke->simpleData.modifiers ) { 254 if ( ke->simpleData.keycode == Key_F31 && !ke->simpleData.modifiers ) {
251 if ( press ) emit symbol(); 255 if ( press ) emit symbol();
252 return TRUE; 256 return TRUE;
253 } 257 }
254 if ( ke->simpleData.keycode == Key_NumLock ) { 258 if ( ke->simpleData.keycode == Key_NumLock ) {
255 if ( press ) emit numLockStateToggle(); 259 if ( press ) emit numLockStateToggle();
256 } 260 }
257 if ( ke->simpleData.keycode == Key_CapsLock ) { 261 if ( ke->simpleData.keycode == Key_CapsLock ) {
@@ -539,43 +543,43 @@ static void blankScreen()
539static void darkScreen() 543static void darkScreen()
540{ 544{
541 extern void qpe_setBacklight(int); 545 extern void qpe_setBacklight(int);
542 qpe_setBacklight(0); // force off 546 qpe_setBacklight(0); // force off
543} 547}
544 548
545 549
546void Desktop::togglePower() 550void Desktop::togglePower()
547{ 551{
548 bool wasloggedin = loggedin; 552 bool wasloggedin = loggedin;
549 loggedin=0; 553 loggedin=0;
550 darkScreen(); 554 darkScreen();
551 if ( wasloggedin ) 555 if ( wasloggedin )
552 blankScreen(); 556 blankScreen();
553 557
554 system("apm --suspend"); 558 system("apm --suspend");
555 execAutoStart(); 559
556 QWSServer::screenSaverActivate( FALSE ); 560 QWSServer::screenSaverActivate( FALSE );
557 { 561 {
558 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep 562 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep
559 QCopEnvelope e("QPE/System", "setBacklight(int)"); 563 QCopEnvelope e("QPE/System", "setBacklight(int)");
560 e << -3; // Force on 564 e << -3; // Force on
561 } 565 }
562 if ( wasloggedin ) { 566 if ( wasloggedin ) {
563 login(TRUE); 567 login(TRUE);
564 } 568 }
565 569 execAutoStart();
566 //qcopBridge->closeOpenConnections(); 570 //qcopBridge->closeOpenConnections();
567 //qDebug("called togglePower()!!!!!!"); 571 //qDebug("called togglePower()!!!!!!");
568} 572}
569 573
570void Desktop::toggleLight() 574void Desktop::toggleLight()
571{ 575{
572 QCopEnvelope e("QPE/System", "setBacklight(int)"); 576 QCopEnvelope e("QPE/System", "setBacklight(int)");
573 e << -2; // toggle 577 e << -2; // toggle
574} 578}
575 579
576void Desktop::toggleSymbolInput() 580void Desktop::toggleSymbolInput()
577{ 581{
578 tb->toggleSymbolInput(); 582 tb->toggleSymbolInput();
579} 583}
580 584
581void Desktop::toggleNumLockState() 585void Desktop::toggleNumLockState()