-rw-r--r-- | core/launcher/startmenu.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 88c6219..39e07c8 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -232,36 +232,37 @@ bool StartMenu::loadMenu( AppLnkSet *folder, QPopupMenu *menu ) if ( sepId && ( menu-> idAt ( 0 ) == sepId )) { // no tabs entries menu-> removeItem ( sepId ); sepId = 0; } if ( !menu-> count ( )) // if we don't do this QPopupMenu will insert a dummy Separator, which won't go away later sepId = menu-> insertSeparator ( ); return result; } -void StartMenu::launch() +void StartMenu::launch ( ) { - int y = mapToGlobal( QPoint() ).y() - launchMenu->sizeHint().height(); + int y = mapToGlobal ( QPoint ( )). y ( ) - launchMenu-> sizeHint ( ). height ( ); - if ( launchMenu->isVisible() ) - launchMenu->hide(); + if ( launchMenu-> isVisible ( )) { + launchMenu-> hide ( ); + } else { - QWidget *active = qApp->activeWindow(); - if ( active && active->isPopup() ) - active->close(); - - launchMenu->popup( QPoint( 1, y ) ); + 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 ) { |