-rw-r--r-- | core/launcher/desktop.cpp | 23 | ||||
-rw-r--r-- | core/launcher/desktop.h | 1 | ||||
-rw-r--r-- | core/launcher/startmenu.cpp | 7 |
3 files changed, 10 insertions, 21 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 3e8c731..34b52d2 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -343,28 +343,28 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) if ( !press && cardSendTimer ) { emit contacts(); delete cardSendTimer; } else if ( press ) { cardSendTimer = new QTimer(); cardSendTimer->start( 2000, TRUE ); connect( cardSendTimer, SIGNAL( timeout() ), this, SLOT( sendCard() ) ); } return TRUE; } -// if ( ke->simpleData.keycode == Key_F11 ) { -// if ( press ) emit menu(); -// return TRUE; -// } + 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; @@ -894,27 +894,12 @@ void Desktop::keyClick() void Desktop::screenClick() { if ( touchclick ) ODevice::inst ( ) -> touchSound ( ); } void Desktop::soundAlarm() { if ( qpedesktop-> alarmsound ) ODevice::inst ( ) -> alarmSound ( ); } -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(); - } - raiseMenu(); - return TRUE; - } - } - return FALSE; -} diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index f6059b8..13f28b3 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h @@ -121,25 +121,24 @@ public slots: void toggleNumLockState(); void toggleCapsLockState(); void toggleSymbolInput(); void terminateServers(); void rereadVolumes(); void home ( ); protected: void executeOrModify( const QString& appLnkFile ); void styleChange( QStyle & ); void timerEvent( QTimerEvent *e ); - bool eventFilter( QObject *, QEvent * ); QWidget *bg; Launcher *launcher; TaskBar *tb; private: void startTransferServer(); bool recoverMemory(); QCopBridge *qcopBridge; TransferServer *transferServer; PackageSlave *packageSlave; diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index d9382d2..e663072 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -238,26 +238,31 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) sepId = menu-> insertSeparator ( ); return result; } void StartMenu::launch() { int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); if ( launchMenu->isVisible() ) launchMenu->hide(); - else + else { + QWidget *active = qApp->activeWindow(); + if ( active && active->isPopup() ) + active->close(); + launchMenu->popup( QPoint( 1, y ) ); + } } const AppLnk* StartMenu::execToLink(const QString& appname) { const AppLnk* a = apps->findExec( appname ); return a; } void StartPopupMenu::keyPressEvent( QKeyEvent *e ) { if ( e->key() == Key_F33 || e->key() == Key_Space ) { // "OK" button, little hacky |