diff options
author | markt <markt> | 2007-03-21 22:47:56 (GMT) |
---|---|---|
committer | markt <markt> | 2007-03-21 22:47:56 (GMT) |
commit | 2b7f9a5899a1bfc680761ae6792af0eeb99d76f3 (patch) | |
tree | c80e82fe26b383a5135ad1c07396581662edd052 /src/FbCommands.cc | |
parent | ff3ea6f5aa685dbf1b285905ccdb6c0a6e9a0e9f (diff) | |
download | fluxbox-2b7f9a5899a1bfc680761ae6792af0eeb99d76f3.zip fluxbox-2b7f9a5899a1bfc680761ae6792af0eeb99d76f3.tar.bz2 |
hidemenus hide custommenus and fix custommenu memleak
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r-- | src/FbCommands.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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 | ||
274 | ShowCustomMenuCmd::ShowCustomMenuCmd(const string &arguments) : custom_menu_file(arguments) {} | 276 | ShowCustomMenuCmd::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 | ||
284 | void ShowRootMenuCmd::execute() { | 287 | void ShowRootMenuCmd::execute() { |