all repos — fluxbox @ 10f769f7fc1766a647a063f4204d7c5b0b0e45ba

custom fork of the fluxbox windowmanager

when a transient dies, revert focus to its parent
Mark Tiefenbruck mark@fluxbox.org
commit

10f769f7fc1766a647a063f4204d7c5b0b0e45ba

parent

6875a611dca24054ef4a116a51bd70eb98bcf0b8

2 files changed, 6 insertions(+), 7 deletions(-)

jump to
M src/FocusControl.ccsrc/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.ccsrc/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);