aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/FocusControl.cc24
-rw-r--r--src/FocusControl.hh1
-rw-r--r--src/Window.cc2
4 files changed, 30 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 93847ec..ae88888 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/04:
4 * Move minimized windows to the back of the focused list (Mark)
5 Window.cc FocusControl.cc/hh
3*07/01/03: 6*07/01/03:
4 * Don't run [startup] items in apps file on fluxbox restart (Mark) 7 * Don't run [startup] items in apps file on fluxbox restart (Mark)
5 Remember.cc fluxbox.cc 8 Remember.cc fluxbox.cc
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index d3e6838..d09738d 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -151,6 +151,30 @@ void FocusControl::addFocusBack(WinClient &client) {
151 m_creation_order_list.push_back(&client); 151 m_creation_order_list.push_back(&client);
152} 152}
153 153
154// move all clients in given window to back of focused list
155void FocusControl::setFocusBack(FluxboxWindow *fbwin) {
156 // do nothing if there are no windows open
157 if (m_focused_list.empty())
158 return;
159
160 FocusedWindows::iterator it = m_focused_list.begin();
161 // use back to avoid an infinite loop
162 FocusedWindows::iterator it_back = --m_focused_list.end();
163
164 while (it != it_back) {
165 if ((*it)->fbwindow() == fbwin) {
166 m_focused_list.push_back(*it);
167 it = m_focused_list.erase(it);
168 } else
169 ++it;
170 }
171 // move the last one, if necessary, in order to preserve focus order
172 if ((*it)->fbwindow() == fbwin) {
173 m_focused_list.push_back(*it);
174 m_focused_list.erase(it);
175 }
176}
177
154void FocusControl::stopCyclingFocus() { 178void FocusControl::stopCyclingFocus() {
155 // nothing to do 179 // nothing to do
156 if (!m_cycling_focus) 180 if (!m_cycling_focus)
diff --git a/src/FocusControl.hh b/src/FocusControl.hh
index 9b7c5b6..df7922b 100644
--- a/src/FocusControl.hh
+++ b/src/FocusControl.hh
@@ -85,6 +85,7 @@ public:
85 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; } 85 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; }
86 bool isCycling() const { return m_cycling_focus; } 86 bool isCycling() const { return m_cycling_focus; }
87 void addFocusBack(WinClient &client); 87 void addFocusBack(WinClient &client);
88 void setFocusBack(FluxboxWindow *fbwin);
88 89
89 FocusModel focusModel() const { return *m_focus_model; } 90 FocusModel focusModel() const { return *m_focus_model; }
90 TabFocusModel tabFocusModel() const { return *m_tab_focus_model; } 91 TabFocusModel tabFocusModel() const { return *m_tab_focus_model; }
diff --git a/src/Window.cc b/src/Window.cc
index b341937..53ec88d 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1558,6 +1558,8 @@ void FluxboxWindow::iconify() {
1558 1558
1559 hide(true); 1559 hide(true);
1560 1560
1561 screen().focusControl().setFocusBack(this);
1562
1561 ClientList::iterator client_it = m_clientlist.begin(); 1563 ClientList::iterator client_it = m_clientlist.begin();
1562 const ClientList::iterator client_it_end = m_clientlist.end(); 1564 const ClientList::iterator client_it_end = m_clientlist.end();
1563 for (; client_it != client_it_end; ++client_it) { 1565 for (; client_it != client_it_end; ++client_it) {