when a transient dies, revert focus to its parent
Mark Tiefenbruck mark@fluxbox.org
2 files changed,
6 insertions(+),
7 deletions(-)
M
src/FocusControl.cc
→
src/FocusControl.cc
@@ -505,13 +505,13 @@ return; // nothing more we can do
BScreen &screen = fbwin->screen(); + if (client.isTransient() && client.transientFor()->focus()) + return; + if (!unfocus_frame) { WinClient *last_focus = screen.focusControl().lastFocusedWindow(*fbwin, &client); - if (last_focus != 0 && - fbwin->setCurrentClient(*last_focus, - s_focused_window == &client)) { + if (last_focus && last_focus->focus()) return; - } } if (full_revert && s_focused_window == &client)
M
src/WinClient.cc
→
src/WinClient.cc
@@ -126,7 +126,6 @@ assert(transient_for != this);
transient_for->transientList().remove(this); if (m_modal) transient_for->removeModal(); - transient_for = 0; } while (!transients.empty()) {@@ -141,13 +140,13 @@
// this takes care of any focus issues m_diesig.notify(); - Fluxbox *fluxbox = Fluxbox::instance(); - // This fixes issue 1 (see WinClient.hh): // If transients die before the transient_for is created + transient_for = 0; removeTransientFromWaitingList(); s_transient_wait.erase(window()); + Fluxbox *fluxbox = Fluxbox::instance(); if (window_group != 0) { fluxbox->removeGroupSearch(window_group);