aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-21 21:16:19 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-21 21:16:19 (GMT)
commite2dbdeeb2eb1dd1e2ff97499e894a86d47d9e3db (patch)
treeb8c195be09bb46413025ed2a8f0c3cc7eadc8482 /src/Screen.hh
parent145cf94ea67a7d58ccd0a90dae8cba8c38a3275a (diff)
downloadfluxbox-e2dbdeeb2eb1dd1e2ff97499e894a86d47d9e3db.zip
fluxbox-e2dbdeeb2eb1dd1e2ff97499e894a86d47d9e3db.tar.bz2
Fix segfault on shutdown
There was a problem deep within how the menus were connected and when and what gets deleted. It was clearly related to a menu which was kind of global. In order to better understand the code flow I eliminated the ExtraMenu code: it was used only to get the Remember-Menu into the Window-Menu. Instead of having a singleton of the Remember-Menu and fight against the shaky interconnections we just create a new one on demand and delete when the menu gets deleted. Looks like this fixes the problem. The menu code needs more love anyway. Closes #1118
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index 771899f..c9a6ede 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -82,7 +82,6 @@ public:
82 82
83 typedef std::vector<Workspace *> Workspaces; 83 typedef std::vector<Workspace *> Workspaces;
84 typedef std::vector<std::string> WorkspaceNames; 84 typedef std::vector<std::string> WorkspaceNames;
85 typedef std::list<std::pair<FbTk::FbString, FbTk::Menu *> > ExtraMenus;
86 85
87 BScreen(FbTk::ResourceManager &rm, 86 BScreen(FbTk::ResourceManager &rm,
88 const std::string &screenname, const std::string &altscreenname, 87 const std::string &screenname, const std::string &altscreenname,
@@ -113,8 +112,6 @@ public:
113 FbMenu &configMenu() { return *m_configmenu.get(); } 112 FbMenu &configMenu() { return *m_configmenu.get(); }
114 const FbMenu &windowMenu() const { return *m_windowmenu.get(); } 113 const FbMenu &windowMenu() const { return *m_windowmenu.get(); }
115 FbMenu &windowMenu() { return *m_windowmenu.get(); } 114 FbMenu &windowMenu() { return *m_windowmenu.get(); }
116 ExtraMenus &extraWindowMenus() { return m_extramenus; }
117 const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
118 115
119 FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; } 116 FbWinFrame::TabPlacement getTabPlacement() const { return *resource.tab_placement; }
120 117
@@ -480,8 +477,6 @@ private:
480 std::auto_ptr<FbTk::ImageControl> m_image_control; 477 std::auto_ptr<FbTk::ImageControl> m_image_control;
481 std::auto_ptr<FbMenu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu; 478 std::auto_ptr<FbMenu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu;
482 479
483 ExtraMenus m_extramenus;
484
485 Icons m_icon_list; 480 Icons m_icon_list;
486 481
487 std::auto_ptr<Slit> m_slit; 482 std::auto_ptr<Slit> m_slit;