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-11-01 09:57:20 (GMT)
commitf2709b26d8af7292f750fc05525ac90ad0d99c41 (patch)
tree794903544922abe2b90af6250de24124cd94d546 /src/FbCommands.cc
parent0584414d3845239202d5ea02da2ce6fb5b1b0cbb (diff)
downloadfluxbox_pavel-f2709b26d8af7292f750fc05525ac90ad0d99c41.zip
fluxbox_pavel-f2709b26d8af7292f750fc05525ac90ad0d99c41.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 e91484c..2eb179f 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -372,7 +372,7 @@ void ShowWorkspaceMenuCmd::execute() {
372 if (screen == 0) 372 if (screen == 0)
373 return; 373 return;
374 374
375 ::showMenu(*screen, screen->workspaceMenu()); 375 ::showMenu(*screen, *screen->workspaceMenu());
376} 376}
377 377
378REGISTER_COMMAND_WITH_ARGS(setworkspacename, FbCommands::SetWorkspaceNameCmd, void); 378REGISTER_COMMAND_WITH_ARGS(setworkspacename, FbCommands::SetWorkspaceNameCmd, void);