aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Kinnunen <fluxgen at fluxbox dot org>2011-03-19 18:19:26 (GMT)
committerHenrik Kinnunen <fluxgen at fluxbox dot org>2011-03-19 18:19:26 (GMT)
commit0b6c860fa0067c73216209878ed1ae46f541f571 (patch)
tree471b149a1671eba16e02a96ac15d9c5ad8cba561 /src
parent97e08c3853a77571f4d51b481581877db2250555 (diff)
downloadfluxbox_pavel-0b6c860fa0067c73216209878ed1ae46f541f571.zip
fluxbox_pavel-0b6c860fa0067c73216209878ed1ae46f541f571.tar.bz2
delete config menu first at shutdown
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 45ca998..107f4d2 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -504,7 +504,9 @@ BScreen::~BScreen() {
504 504
505 if (! managed) 505 if (! managed)
506 return; 506 return;
507 507
508 m_configmenu.reset(0);
509
508 m_toolbar.reset(0); 510 m_toolbar.reset(0);
509 511
510 FbTk::EventManager *evm = FbTk::EventManager::instance(); 512 FbTk::EventManager *evm = FbTk::EventManager::instance();
@@ -573,7 +575,12 @@ BScreen::~BScreen() {
573 575
574 // slit must be destroyed before headAreas (Struts) 576 // slit must be destroyed before headAreas (Struts)
575 m_slit.reset(0); 577 m_slit.reset(0);
578
576 579
580 delete m_rootmenu.release();
581 delete m_workspacemenu.release();
582 delete m_windowmenu.release();
583
577 // TODO fluxgen: check if this is the right place 584 // TODO fluxgen: check if this is the right place
578 for (size_t i = 0; i < m_head_areas.size(); i++) 585 for (size_t i = 0; i < m_head_areas.size(); i++)
579 delete m_head_areas[i]; 586 delete m_head_areas[i];
@@ -1469,7 +1476,8 @@ void BScreen::rereadWindowMenu() {
1469 1476
1470void BScreen::addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu) { 1477void BScreen::addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu) {
1471 m_configmenu_list.push_back(make_pair(label, &menu)); 1478 m_configmenu_list.push_back(make_pair(label, &menu));
1472 setupConfigmenu(*m_configmenu.get()); 1479 if (m_configmenu.get())
1480 setupConfigmenu(*m_configmenu.get());
1473} 1481}
1474 1482
1475void BScreen::removeConfigMenu(FbTk::Menu &menu) { 1483void BScreen::removeConfigMenu(FbTk::Menu &menu) {
@@ -1480,7 +1488,7 @@ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
1480 if (erase_it != m_configmenu_list.end()) 1488 if (erase_it != m_configmenu_list.end())
1481 m_configmenu_list.erase(erase_it); 1489 m_configmenu_list.erase(erase_it);
1482 1490
1483 if (!isShuttingdown()) 1491 if (!isShuttingdown() && m_configmenu.get())
1484 setupConfigmenu(*m_configmenu.get()); 1492 setupConfigmenu(*m_configmenu.get());
1485 1493
1486} 1494}