Razor-qt/razor-qt — Issue #225: hide main menu when it's visible
Author: CaledoniaProject
Created: 2012-03-01 02:20:25+00:00
State: open

When user hitt "ALT+F1" again , and if mMenu is visible , it should hide.

diff --git a/razorqt-panel/plugin-mainmenu/razormainmenu.cpp b/razorqt-panel/plugin-mainmenu/razormainmenu.cpp
index 8e73ff7..91caba3 100644
--- a/razorqt-panel/plugin-mainmenu/razormainmenu.cpp
+++ b/razorqt-panel/plugin-mainmenu/razormainmenu.cpp
@@ -99,6 +99,12 @@ void RazorMainMenu::showMenu()
if (!mMenu)
return;

+ if ( mMenu->isVisible() )
+ {
+ mMenu->hide();
+ return;
+ }
+
int x, y;

switch (panel()->position())