-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 | |||
@@ -351,12 +351,12 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
351 | } | 351 | } |
352 | return TRUE; | 352 | return TRUE; |
353 | } | 353 | } |
354 | 354 | ||
355 | // if ( ke->simpleData.keycode == Key_F11 ) { | 355 | if ( ke->simpleData.keycode == Key_F11 ) { |
356 | // if ( press ) emit menu(); | 356 | if ( press ) emit menu(); |
357 | // return TRUE; | 357 | return TRUE; |
358 | // } | 358 | } |
359 | 359 | ||
360 | if ( ke->simpleData.keycode == Key_F12 ) { | 360 | if ( ke->simpleData.keycode == Key_F12 ) { |
361 | while ( activePopupWidget() ) | 361 | while ( activePopupWidget() ) |
362 | activePopupWidget() ->close(); | 362 | activePopupWidget() ->close(); |
@@ -902,19 +902,4 @@ void Desktop::soundAlarm() | |||
902 | if ( qpedesktop-> alarmsound ) | 902 | if ( qpedesktop-> alarmsound ) |
903 | ODevice::inst ( ) -> alarmSound ( ); | 903 | ODevice::inst ( ) -> alarmSound ( ); |
904 | } | 904 | } |
905 | 905 | ||
906 | bool Desktop::eventFilter( QObject *, QEvent *ev ) | ||
907 | { | ||
908 | if ( ev->type() == QEvent::KeyPress ) { | ||
909 | QKeyEvent *ke = (QKeyEvent *)ev; | ||
910 | if ( ke->key() == Qt::Key_F11 ) { // menu key | ||
911 | QWidget *active = qApp->activeWindow(); | ||
912 | if ( active && active->isPopup() ) { | ||
913 | active->close(); | ||
914 | } | ||
915 | raiseMenu(); | ||
916 | return TRUE; | ||
917 | } | ||
918 | } | ||
919 | return FALSE; | ||
920 | } | ||
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 | |||
@@ -129,9 +129,8 @@ public slots: | |||
129 | protected: | 129 | protected: |
130 | void executeOrModify( const QString& appLnkFile ); | 130 | void executeOrModify( const QString& appLnkFile ); |
131 | void styleChange( QStyle & ); | 131 | void styleChange( QStyle & ); |
132 | void timerEvent( QTimerEvent *e ); | 132 | void timerEvent( QTimerEvent *e ); |
133 | bool eventFilter( QObject *, QEvent * ); | ||
134 | 133 | ||
135 | QWidget *bg; | 134 | QWidget *bg; |
136 | Launcher *launcher; | 135 | Launcher *launcher; |
137 | TaskBar *tb; | 136 | TaskBar *tb; |
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 | |||
@@ -246,10 +246,15 @@ void StartMenu::launch() | |||
246 | int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); | 246 | int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); |
247 | 247 | ||
248 | if ( launchMenu->isVisible() ) | 248 | if ( launchMenu->isVisible() ) |
249 | launchMenu->hide(); | 249 | launchMenu->hide(); |
250 | else | 250 | else { |
251 | QWidget *active = qApp->activeWindow(); | ||
252 | if ( active && active->isPopup() ) | ||
253 | active->close(); | ||
254 | |||
251 | launchMenu->popup( QPoint( 1, y ) ); | 255 | launchMenu->popup( QPoint( 1, y ) ); |
256 | } | ||
252 | } | 257 | } |
253 | 258 | ||
254 | const AppLnk* StartMenu::execToLink(const QString& appname) | 259 | const AppLnk* StartMenu::execToLink(const QString& appname) |
255 | { | 260 | { |