aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/FbCommands.cc7
-rw-r--r--src/FbCommands.hh5
3 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 96126ba..0a8fb21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/03/21:
4 * HideMenus didn't work on CustomMenus, and also fixed a memleak with
5 CustomMenu (Mark + thanks Julien Trolet)
6 FbCommands.cc/hh
3*07/03/20: 7*07/03/20:
4 * Updated doc/asciidoc/fluxbox.txt (Mathias) 8 * Updated doc/asciidoc/fluxbox.txt (Mathias)
5*07/03/19: 9*07/03/19:
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index d53afd2..20d45e0 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -269,6 +269,8 @@ void HideMenuCmd::execute() {
269 screen->rootMenu().hide(); 269 screen->rootMenu().hide();
270 if (screen->workspaceMenu().isVisible()) 270 if (screen->workspaceMenu().isVisible())
271 screen->workspaceMenu().hide(); 271 screen->workspaceMenu().hide();
272 if (FbTk::Menu::shownMenu())
273 FbTk::Menu::shownMenu()->hide();
272} 274}
273 275
274ShowCustomMenuCmd::ShowCustomMenuCmd(const string &arguments) : custom_menu_file(arguments) {} 276ShowCustomMenuCmd::ShowCustomMenuCmd(const string &arguments) : custom_menu_file(arguments) {}
@@ -277,8 +279,9 @@ void ShowCustomMenuCmd::execute() {
277 BScreen *screen = Fluxbox::instance()->mouseScreen(); 279 BScreen *screen = Fluxbox::instance()->mouseScreen();
278 if (screen == 0) 280 if (screen == 0)
279 return; 281 return;
280 ::showMenu(*screen, *MenuCreator::createFromFile(custom_menu_file, 282 m_menu = MenuCreator::createFromFile(custom_menu_file,
281 screen->screenNumber(), true)); 283 screen->screenNumber(), true);
284 ::showMenu(*screen, **m_menu);
282} 285}
283 286
284void ShowRootMenuCmd::execute() { 287void ShowRootMenuCmd::execute() {
diff --git a/src/FbCommands.hh b/src/FbCommands.hh
index 3bc5074..314d339 100644
--- a/src/FbCommands.hh
+++ b/src/FbCommands.hh
@@ -28,6 +28,9 @@
28 28
29#include "Command.hh" 29#include "Command.hh"
30 30
31#include "FbTk/RefCount.hh"
32#include "FbTk/Menu.hh"
33
31#include <string> 34#include <string>
32 35
33namespace FbCommands { 36namespace FbCommands {
@@ -124,7 +127,7 @@ public:
124 void execute(); 127 void execute();
125private: 128private:
126 std::string custom_menu_file; 129 std::string custom_menu_file;
127 130 FbTk::RefCount<FbTk::Menu> m_menu;
128}; 131};
129 132
130class ShowRootMenuCmd: public FbTk::Command { 133class ShowRootMenuCmd: public FbTk::Command {