aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-02 15:21:24 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-02 15:21:24 (GMT)
commit442e69c89b721329883113389f889675138e7da7 (patch)
tree211111eb98eb3da6155baea0a24c5cd9d8c6137d /src/FbCommands.cc
parentbd94eaa6cadfd0a7d83f3068a84b27f987bdee4b (diff)
downloadfluxbox_pavel-442e69c89b721329883113389f889675138e7da7.zip
fluxbox_pavel-442e69c89b721329883113389f889675138e7da7.tar.bz2
Store menus if smart pointers (RefCount)
This was originally intended to be a bugfix for an memory error reported by valgrind (accessing freed memory). While debugging it, I found the menu ownership semantics confusing (setInternalMenu() et al.), so I decided to get rid of it and store it in smart pointers everywhere. Looking back, I'm not sure if this was worth all the trouble, but the good news is that the valgrind error disappeared. :)
Diffstat (limited to 'src/FbCommands.cc')
-rw-r--r--src/FbCommands.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index f5907c9..d366164 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -360,7 +360,7 @@ void ShowWorkspaceMenuCmd::execute() {
360 if (screen == 0) 360 if (screen == 0)
361 return; 361 return;
362 362
363 ::showMenu(*screen, screen->workspaceMenu()); 363 ::showMenu(*screen, *screen->workspaceMenu());
364} 364}
365 365
366REGISTER_COMMAND_WITH_ARGS(setworkspacename, FbCommands::SetWorkspaceNameCmd, void); 366REGISTER_COMMAND_WITH_ARGS(setworkspacename, FbCommands::SetWorkspaceNameCmd, void);