summaryrefslogtreecommitdiff
path: root/core/launcher/startmenu.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/startmenu.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/startmenu.cpp7
1 files changed, 6 insertions, 1 deletions
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,27 +238,32 @@ 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
QKeyEvent ke(QEvent::KeyPress, Key_Enter, 13, 0);