summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp23
-rw-r--r--core/launcher/desktop.h1
2 files changed, 20 insertions, 4 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 9863187..387650b 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -475,12 +475,12 @@ 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_F11 ) {
+// if ( press ) emit menu();
+// return TRUE;
+// }
if ( ke->simpleData.keycode == Key_F12 ) {
while ( activePopupWidget() )
activePopupWidget() ->close();
@@ -1046,4 +1046,19 @@ 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 5de85f4..04c2f61 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -124,8 +124,9 @@ public slots:
protected:
void executeOrModify( const QString& appLnkFile );
void styleChange( QStyle & );
void timerEvent( QTimerEvent *e );
+ bool eventFilter( QObject *, QEvent * );
QWidget *bg;
Launcher *launcher;
TaskBar *tb;