diff options
author | markt <markt> | 2007-03-29 19:19:26 (GMT) |
---|---|---|
committer | markt <markt> | 2007-03-29 19:19:26 (GMT) |
commit | 2b83355eef4b473b586bd48cca5816598e0d2be2 (patch) | |
tree | 5775134ace27e4f35274a3e32103f55d5b73a34f /src/FocusControl.cc | |
parent | 9ca59a0ee2ccd59903d42239dab6de1666e390b2 (diff) | |
download | fluxbox-2b83355eef4b473b586bd48cca5816598e0d2be2.zip fluxbox-2b83355eef4b473b586bd48cca5816598e0d2be2.tar.bz2 |
removed groups file, fixed initial_state handling
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r-- | src/FocusControl.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 71b289b..c5ee939 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -220,6 +220,16 @@ void FocusControl::setFocusBack(FluxboxWindow *fbwin) { | |||
220 | if (m_focused_list.empty() || s_reverting) | 220 | if (m_focused_list.empty() || s_reverting) |
221 | return; | 221 | return; |
222 | 222 | ||
223 | // if the window isn't already in this list, we could accidentally add it | ||
224 | Focusables::iterator win_begin = m_focused_win_list.begin(), | ||
225 | win_end = m_focused_win_list.end(); | ||
226 | Focusables::iterator win_it = find(win_begin, win_end, fbwin); | ||
227 | if (win_it == win_end) | ||
228 | return; | ||
229 | |||
230 | m_focused_win_list.erase(win_it); | ||
231 | m_focused_win_list.push_back(fbwin); | ||
232 | |||
223 | Focusables::iterator it = m_focused_list.begin(); | 233 | Focusables::iterator it = m_focused_list.begin(); |
224 | // use back to avoid an infinite loop | 234 | // use back to avoid an infinite loop |
225 | Focusables::iterator it_back = --m_focused_list.end(); | 235 | Focusables::iterator it_back = --m_focused_list.end(); |
@@ -237,9 +247,6 @@ void FocusControl::setFocusBack(FluxboxWindow *fbwin) { | |||
237 | m_focused_list.erase(it); | 247 | m_focused_list.erase(it); |
238 | } | 248 | } |
239 | 249 | ||
240 | m_focused_win_list.remove(fbwin); | ||
241 | m_focused_win_list.push_back(fbwin); | ||
242 | |||
243 | } | 250 | } |
244 | 251 | ||
245 | void FocusControl::stopCyclingFocus() { | 252 | void FocusControl::stopCyclingFocus() { |