summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-23 13:34:06 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-23 13:34:06 (GMT)
commit10f769f7fc1766a647a063f4204d7c5b0b0e45ba (patch)
tree61982ee470d2c4f2c4277eb173f99c3e65251f07
parent6875a611dca24054ef4a116a51bd70eb98bcf0b8 (diff)
downloadfluxbox_lack-10f769f7fc1766a647a063f4204d7c5b0b0e45ba.zip
fluxbox_lack-10f769f7fc1766a647a063f4204d7c5b0b0e45ba.tar.bz2
when a transient dies, revert focus to its parent
-rw-r--r--src/FocusControl.cc8
-rw-r--r--src/WinClient.cc5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index cdc46cf..60615a4 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -505,13 +505,13 @@ void FocusControl::unfocusWindow(WinClient &client,
505 505
506 BScreen &screen = fbwin->screen(); 506 BScreen &screen = fbwin->screen();
507 507
508 if (client.isTransient() && client.transientFor()->focus())
509 return;
510
508 if (!unfocus_frame) { 511 if (!unfocus_frame) {
509 WinClient *last_focus = screen.focusControl().lastFocusedWindow(*fbwin, &client); 512 WinClient *last_focus = screen.focusControl().lastFocusedWindow(*fbwin, &client);
510 if (last_focus != 0 && 513 if (last_focus && last_focus->focus())
511 fbwin->setCurrentClient(*last_focus,
512 s_focused_window == &client)) {
513 return; 514 return;
514 }
515 } 515 }
516 516
517 if (full_revert && s_focused_window == &client) 517 if (full_revert && s_focused_window == &client)
diff --git a/src/WinClient.cc b/src/WinClient.cc
index bded700..aa8c6ed 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -126,7 +126,6 @@ WinClient::~WinClient() {
126 transient_for->transientList().remove(this); 126 transient_for->transientList().remove(this);
127 if (m_modal) 127 if (m_modal)
128 transient_for->removeModal(); 128 transient_for->removeModal();
129 transient_for = 0;
130 } 129 }
131 130
132 while (!transients.empty()) { 131 while (!transients.empty()) {
@@ -141,13 +140,13 @@ WinClient::~WinClient() {
141 // this takes care of any focus issues 140 // this takes care of any focus issues
142 m_diesig.notify(); 141 m_diesig.notify();
143 142
144 Fluxbox *fluxbox = Fluxbox::instance();
145
146 // This fixes issue 1 (see WinClient.hh): 143 // This fixes issue 1 (see WinClient.hh):
147 // If transients die before the transient_for is created 144 // If transients die before the transient_for is created
145 transient_for = 0;
148 removeTransientFromWaitingList(); 146 removeTransientFromWaitingList();
149 s_transient_wait.erase(window()); 147 s_transient_wait.erase(window());
150 148
149 Fluxbox *fluxbox = Fluxbox::instance();
151 150
152 if (window_group != 0) { 151 if (window_group != 0) {
153 fluxbox->removeGroupSearch(window_group); 152 fluxbox->removeGroupSearch(window_group);