hidemenus hide custommenus and fix custommenu memleak
This commit is contained in:
parent
ff3ea6f5aa
commit
2b7f9a5899
3 changed files with 13 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc3:
|
||||
*07/03/21:
|
||||
* HideMenus didn't work on CustomMenus, and also fixed a memleak with
|
||||
CustomMenu (Mark + thanks Julien Trolet)
|
||||
FbCommands.cc/hh
|
||||
*07/03/20:
|
||||
* Updated doc/asciidoc/fluxbox.txt (Mathias)
|
||||
*07/03/19:
|
||||
|
|
|
@ -269,6 +269,8 @@ void HideMenuCmd::execute() {
|
|||
screen->rootMenu().hide();
|
||||
if (screen->workspaceMenu().isVisible())
|
||||
screen->workspaceMenu().hide();
|
||||
if (FbTk::Menu::shownMenu())
|
||||
FbTk::Menu::shownMenu()->hide();
|
||||
}
|
||||
|
||||
ShowCustomMenuCmd::ShowCustomMenuCmd(const string &arguments) : custom_menu_file(arguments) {}
|
||||
|
@ -277,8 +279,9 @@ void ShowCustomMenuCmd::execute() {
|
|||
BScreen *screen = Fluxbox::instance()->mouseScreen();
|
||||
if (screen == 0)
|
||||
return;
|
||||
::showMenu(*screen, *MenuCreator::createFromFile(custom_menu_file,
|
||||
screen->screenNumber(), true));
|
||||
m_menu = MenuCreator::createFromFile(custom_menu_file,
|
||||
screen->screenNumber(), true);
|
||||
::showMenu(*screen, **m_menu);
|
||||
}
|
||||
|
||||
void ShowRootMenuCmd::execute() {
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
#include "Command.hh"
|
||||
|
||||
#include "FbTk/RefCount.hh"
|
||||
#include "FbTk/Menu.hh"
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace FbCommands {
|
||||
|
@ -124,7 +127,7 @@ public:
|
|||
void execute();
|
||||
private:
|
||||
std::string custom_menu_file;
|
||||
|
||||
FbTk::RefCount<FbTk::Menu> m_menu;
|
||||
};
|
||||
|
||||
class ShowRootMenuCmd: public FbTk::Command {
|
||||
|
|
Loading…
Reference in a new issue