Permalink
Browse files

Main menu focus fixed if activated by hotkey

  • Loading branch information...
1 parent 2e796be commit c20724400976c812657d7b3db97332665f36e449 @kuzmas kuzmas committed Jan 13, 2013
Showing with 11 additions and 2 deletions.
  1. +9 −2 razorqt-panel/plugin-mainmenu/razormainmenu.cpp
  2. +2 −0 razorqt-panel/plugin-mainmenu/razormainmenu.h
@@ -132,8 +132,15 @@ void RazorMainMenu::showMenu()
}
- QPoint pos(x, y);
- mMenu->exec(pos);
+ menuPos = QPoint(x, y);
+
+ activateWindow();
+ QTimer::singleShot(1, this, SLOT(afterMenuActivated()));
+}
+
+void RazorMainMenu::afterMenuActivated()
+{
+ mMenu->exec(menuPos);
}
@@ -59,6 +59,7 @@ class RazorMainMenu : public RazorPanelPlugin
QLabel mMainMenuButton;
QString mLogDir;
QMenu* mMenu;
+ QPoint menuPos;
QxtGlobalShortcut *mShortcut;
MenuStyle mTopMenuStyle;
MenuStyle mMenuStyle;
@@ -73,6 +74,7 @@ protected slots:
private slots:
void showMenu();
+ void afterMenuActivated();
void showHideMenu();
};

0 comments on commit c207244

Please sign in to comment.