summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 552c7c3..fb10602 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -200,9 +200,9 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
200 when user presses key, unless keyboard has been requested from app. 200 when user presses key, unless keyboard has been requested from app.
201 will not send multiple repeats if user holds key 201 will not send multiple repeats if user holds key
202 i.e. one shot 202 i.e. one shot
203 203
204 */ 204 */
205 if (!keyRegisterList.isEmpty()) { 205 if (!keyRegisterList.isEmpty()) {
206 KeyRegisterList::Iterator it; 206 KeyRegisterList::Iterator it;
207 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) { 207 for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) {
208 if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat && !keyboardGrabbed() && press) { 208 if ((*it).getKeyCode() == ke->simpleData.keycode && !autoRepeat && !keyboardGrabbed() && press) {
@@ -250,7 +250,7 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
250 if ( press ) emit power(); 250 if ( press ) emit power();
251 return TRUE; 251 return TRUE;
252 } 252 }
253// This was used for the iPAQ PowerButton 253// This was used for the iPAQ PowerButton
254// See main.cpp for new KeyboardFilter 254// See main.cpp for new KeyboardFilter
255// 255//
256// if ( ke->simpleData.keycode == Key_SysReq ) { 256// if ( ke->simpleData.keycode == Key_SysReq ) {
@@ -559,15 +559,14 @@ void Desktop::execAutoStart() {
559 QDateTime now = QDateTime::currentDateTime(); 559 QDateTime now = QDateTime::currentDateTime();
560 Config cfg( "autostart" ); 560 Config cfg( "autostart" );
561 cfg.setGroup( "AutoStart" ); 561 cfg.setGroup( "AutoStart" );
562 appName = cfg.readEntry("Apps", ""); 562 appName = cfg.readEntry( "Apps", "" );
563 delay = (cfg.readEntry("Delay", "0" )).toInt(); 563 delay = ( cfg.readEntry( "Delay", "0" ) ).toInt();
564 // If the time between suspend and resume was longer then the 564 // If the time between suspend and resume was longer then the
565 // value saved as delay, start the app 565 // value saved as delay, start the app
566 if ( suspendTime.secsTo(now) >= (delay*60) ) { 566 if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) {
567 QCopEnvelope e("QPE/System", "execute(QString)"); 567 QCopEnvelope e( "QPE/System", "execute(QString)" );
568 e << QString(appName); 568 e << QString( appName );
569 } //else { 569 }
570 //}
571} 570}
572 571
573#if defined(QPE_HAVE_TOGGLELIGHT) 572#if defined(QPE_HAVE_TOGGLELIGHT)
@@ -607,10 +606,10 @@ void Desktop::togglePower()
607 extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop 606 extern void qpe_setBacklight ( int ); // We need to toggle the LCD fast - no time to send a QCop
608 607
609 static bool excllock = false; 608 static bool excllock = false;
610 609
611 if ( excllock ) 610 if ( excllock )
612 return; 611 return;
613 612
614 excllock = true; 613 excllock = true;
615 614
616 bool wasloggedin = loggedin; 615 bool wasloggedin = loggedin;
@@ -638,9 +637,9 @@ void Desktop::togglePower()
638 execAutoStart(); 637 execAutoStart();
639 //qcopBridge->closeOpenConnections(); 638 //qcopBridge->closeOpenConnections();
640 //qDebug("called togglePower()!!!!!!"); 639 //qDebug("called togglePower()!!!!!!");
641 640
642 qApp-> processEvents ( ); 641 qApp-> processEvents ( );
643 642
644 excllock = false; 643 excllock = false;
645} 644}
646 645
@@ -700,12 +699,12 @@ void DesktopApplication::shutdown( ShutdownImpl::Type t )
700 break; 699 break;
701 case ShutdownImpl::TerminateDesktop: 700 case ShutdownImpl::TerminateDesktop:
702 prepareForTermination(FALSE); 701 prepareForTermination(FALSE);
703 702
704 // This is a workaround for a Qt bug 703 // This is a workaround for a Qt bug
705 // clipboard applet has to stop its poll timer, or Qt/E 704 // clipboard applet has to stop its poll timer, or Qt/E
706 // will hang on quit() right before it emits aboutToQuit() 705 // will hang on quit() right before it emits aboutToQuit()
707 emit aboutToQuit ( ); 706 emit aboutToQuit ( );
708 707
709 quit(); 708 quit();
710 break; 709 break;
711 } 710 }
@@ -798,7 +797,7 @@ bool Desktop::eventFilter( QObject *, QEvent *ev )
798 QKeyEvent *ke = (QKeyEvent *) ev; 797 QKeyEvent *ke = (QKeyEvent *) ev;
799 if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key 798 if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key
800 QWidget *active = qApp-> activeWindow ( ); 799 QWidget *active = qApp-> activeWindow ( );
801 800
802 if ( active && active-> isPopup ( )) 801 if ( active && active-> isPopup ( ))
803 active->close(); 802 active->close();
804 803