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
-rw-r--r--core/launcher/startmenu.cpp7
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
@@ -353,8 +353,8 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
}
-// 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 ) {
@@ -904,17 +904,2 @@ void Desktop::soundAlarm()
}
-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
@@ -131,5 +131,4 @@ protected:
void styleChange( QStyle & );
void timerEvent( QTimerEvent *e );
- bool eventFilter( QObject *, QEvent * );
QWidget *bg;
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
@@ -248,6 +248,11 @@ void StartMenu::launch()
if ( launchMenu->isVisible() )
launchMenu->hide();
- else
+ else {
+ QWidget *active = qApp->activeWindow();
+ if ( active && active->isPopup() )
+ active->close();
+
launchMenu->popup( QPoint( 1, y ) );
+ }
}