On 29-Nov-2001 Henrik Kinnunen wrote:
> There is a quick fix for it.
> The crash is caused due to a window that doesn't set focus to another window
> when it dies and thus makes the Blackbox::focused_window point to a dead
> BlackboxWindow.
> This is fixed by adding these lines in the Window.cc in
> BlackboxWindow::~BlackboxWindow row 446 :
>
> if (client.transient_for)
> blackbox->setFocusedWindow(client.transient_for);
>
> and for Fluxbox 0.1.4 in Window.cc in FluxboxWindow::~FluxboxWindow row 506 :
>
> if (client.transient_for)
> fluxbox->setFocusedWindow(client.transient_for);
>
> This is a quickfix for it and these lines should later be in
> Workspace::removeWindow(...)
>
if (w->isFocused()) {
if (screen->isSloppyFocus())
screen->getBlackbox()->setFocusedWindow((BlackboxWindow *) 0);
else if (w->isTransient() && w->getTransientFor() &&
w->getTransientFor()->isVisible())
w->getTransientFor()->setInputFocus();
else {
BlackboxWindow *top = stackingList->first();
if (! top || ! top->setInputFocus()) {
screen->getBlackbox()->setFocusedWindow((BlackboxWindow *) 0);
XSetInputFocus(screen->getBlackbox()->getXDisplay(),
screen->getToolbar()->getWindowID(),
RevertToParent, CurrentTime);
}
}
}
That is the core of removeWindow(). Which seems to handle the issue you are
saying exists. Is this a race condition somewhere? What brought you to the
conclusion that this is the problem?