From bb3f955e0f4959dc66bee8c27e3b15b399c6a845 Mon Sep 17 00:00:00 2001 From: Henrik Kinnunen Date: Wed, 23 Feb 2011 07:38:45 +0100 Subject: Fixed possible crash issue when getting an unmap before a focus in event. The issue was caused by a client that got an unmap notify and had a FocusIn event directly after in the event queue. The focus in event was handled by Fluxbox::revertFocus before the WinClient.cc removed itself from the search window list. --- src/WinClient.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/WinClient.cc b/src/WinClient.cc index 33d9fb4..4ef37ae 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc @@ -129,6 +129,9 @@ WinClient::~WinClient() { fbdbg<<__FILE__<<"(~"<<__FUNCTION__<<")[this="<remove(window()); + Fluxbox *fluxbox = Fluxbox::instance(); + if (window()) + fluxbox->removeWindowSearch(window()); clearStrut(); @@ -160,8 +163,6 @@ WinClient::~WinClient() { removeTransientFromWaitingList(); s_transient_wait.erase(window()); - Fluxbox *fluxbox = Fluxbox::instance(); - if (window_group != 0) { fluxbox->removeGroupSearch(window_group); window_group = 0; @@ -170,8 +171,6 @@ WinClient::~WinClient() { if (m_mwm_hint != 0) XFree(m_mwm_hint); - if (window()) - fluxbox->removeWindowSearch(window()); } bool WinClient::acceptsFocus() const { -- cgit v0.11.2