From cbc8e23ed2d8f8c3702e8ff53943b5844d1b9de2 Mon Sep 17 00:00:00 2001 From: rathnor Date: Fri, 27 Aug 2004 17:24:49 +0000 Subject: fluxbox::shutdown wasn't safe to get interruped by another signal --- ChangeLog | 2 ++ src/fluxbox.cc | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6627169..99edeb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ (Format: Year/Month/Day) Changes for 0.9.10: *04/08/27: + * Protect Fluxbox::shutdown better from being double-called (Simon) + fluxbox.cc * Improve fallback if toolbar button style item missing (Simon) ButtonTheme.hh/cc ToolFactory.cc *04/08/26: diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 001b146..07c86fd 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.249 2004/08/18 16:30:33 rathnor Exp $ +// $Id: fluxbox.cc,v 1.250 2004/08/27 17:24:49 rathnor Exp $ #include "fluxbox.hh" @@ -1621,13 +1621,16 @@ void Fluxbox::restart(const char *prog) { /// prepares fluxbox for a shutdown void Fluxbox::shutdown() { + if (m_shutdown) + return; + + m_shutdown = true; XSetInputFocus(FbTk::App::instance()->display(), PointerRoot, None, CurrentTime); //send shutdown to all screens for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::shutdown)); - m_shutdown = true; sync(false); } -- cgit v0.11.2