diff options
author | rathnor <rathnor> | 2004-08-27 17:24:49 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-08-27 17:24:49 (GMT) |
commit | cbc8e23ed2d8f8c3702e8ff53943b5844d1b9de2 (patch) | |
tree | 86a1c52a57f7c0042a013f49d87d3f2d83c96c12 | |
parent | d6b046c10f9e6d1516683708abafcf2af142f095 (diff) | |
download | fluxbox-cbc8e23ed2d8f8c3702e8ff53943b5844d1b9de2.zip fluxbox-cbc8e23ed2d8f8c3702e8ff53943b5844d1b9de2.tar.bz2 |
fluxbox::shutdown wasn't safe to get interruped by another signal
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/fluxbox.cc | 7 |
2 files changed, 7 insertions, 2 deletions
@@ -1,6 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.10: | 2 | Changes for 0.9.10: |
3 | *04/08/27: | 3 | *04/08/27: |
4 | * Protect Fluxbox::shutdown better from being double-called (Simon) | ||
5 | fluxbox.cc | ||
4 | * Improve fallback if toolbar button style item missing (Simon) | 6 | * Improve fallback if toolbar button style item missing (Simon) |
5 | ButtonTheme.hh/cc ToolFactory.cc | 7 | ButtonTheme.hh/cc ToolFactory.cc |
6 | *04/08/26: | 8 | *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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.249 2004/08/18 16:30:33 rathnor Exp $ | 25 | // $Id: fluxbox.cc,v 1.250 2004/08/27 17:24:49 rathnor Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -1621,13 +1621,16 @@ void Fluxbox::restart(const char *prog) { | |||
1621 | 1621 | ||
1622 | /// prepares fluxbox for a shutdown | 1622 | /// prepares fluxbox for a shutdown |
1623 | void Fluxbox::shutdown() { | 1623 | void Fluxbox::shutdown() { |
1624 | if (m_shutdown) | ||
1625 | return; | ||
1626 | |||
1627 | m_shutdown = true; | ||
1624 | 1628 | ||
1625 | XSetInputFocus(FbTk::App::instance()->display(), PointerRoot, None, CurrentTime); | 1629 | XSetInputFocus(FbTk::App::instance()->display(), PointerRoot, None, CurrentTime); |
1626 | 1630 | ||
1627 | //send shutdown to all screens | 1631 | //send shutdown to all screens |
1628 | for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::shutdown)); | 1632 | for_each(m_screen_list.begin(), m_screen_list.end(), mem_fun(&BScreen::shutdown)); |
1629 | 1633 | ||
1630 | m_shutdown = true; | ||
1631 | sync(false); | 1634 | sync(false); |
1632 | 1635 | ||
1633 | } | 1636 | } |