diff options
author | rathnor <rathnor> | 2003-06-06 14:45:13 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-06-06 14:45:13 (GMT) |
commit | 2fc279a5e295ebfcb28e7cc234b8f91732939dd1 (patch) | |
tree | 3368b93d868bf15a8c631a64d4d561be8c3ad579 /src/Window.cc | |
parent | 06de965f4b8e94bfb791fc14e4f3b05b44b0c73c (diff) | |
download | fluxbox-2fc279a5e295ebfcb28e7cc234b8f91732939dd1.zip fluxbox-2fc279a5e295ebfcb28e7cc234b8f91732939dd1.tar.bz2 |
fix crash on window attach - triggered when attaching from the focused window
later unfocusing that window would die since it had no client. Now we
make sure we remove all references from the fluxbox Window->FluxboxWindow list first
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc index 2101e0d..2c580d5 100644 --- a/src/Window.cc +++ b/src/Window.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: Window.cc,v 1.187 2003/05/26 04:24:24 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.188 2003/06/06 14:45:13 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -298,6 +298,9 @@ FluxboxWindow::~FluxboxWindow() { | |||
298 | XUngrabPointer(display, CurrentTime); | 298 | XUngrabPointer(display, CurrentTime); |
299 | } | 299 | } |
300 | 300 | ||
301 | // no longer a valid window to do stuff with | ||
302 | Fluxbox::instance()->removeWindowSearch(frame().window().window()); | ||
303 | |||
301 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); | 304 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); |
302 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); | 305 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); |
303 | for (; it != it_end; ++it) { | 306 | for (; it != it_end; ++it) { |
@@ -321,7 +324,7 @@ FluxboxWindow::~FluxboxWindow() { | |||
321 | detachClient(*m_clientlist.back()); | 324 | detachClient(*m_clientlist.back()); |
322 | } | 325 | } |
323 | } | 326 | } |
324 | Fluxbox::instance()->removeWindowSearch(frame().window().window()); | 327 | |
325 | #ifdef DEBUG | 328 | #ifdef DEBUG |
326 | cerr<<__FILE__<<"("<<__LINE__<<"): ~FluxboxWindow("<<this<<")"<<endl; | 329 | cerr<<__FILE__<<"("<<__LINE__<<"): ~FluxboxWindow("<<this<<")"<<endl; |
327 | #endif // DEBUG | 330 | #endif // DEBUG |