diff options
author | markt <markt> | 2007-01-04 00:11:22 (GMT) |
---|---|---|
committer | markt <markt> | 2007-01-04 00:11:22 (GMT) |
commit | 1dc07de3188c8c78f69e273694b27fa580423b55 (patch) | |
tree | 264f44a0d3a0d49f114eedfac890ec180b270d55 /src/FocusControl.cc | |
parent | e2e94031f962513c746857349e8511b296d25986 (diff) | |
download | fluxbox_pavel-1dc07de3188c8c78f69e273694b27fa580423b55.zip fluxbox_pavel-1dc07de3188c8c78f69e273694b27fa580423b55.tar.bz2 |
move iconified windows to the end of the focused list for cycling/reverting
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 24 |
1 files changed, 24 insertions, 0 deletions
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 | ||
155 | void 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 | |||
154 | void FocusControl::stopCyclingFocus() { | 178 | void FocusControl::stopCyclingFocus() { |
155 | // nothing to do | 179 | // nothing to do |
156 | if (!m_cycling_focus) | 180 | if (!m_cycling_focus) |