aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FocusControl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 716883b..f60e9dd 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -110,7 +110,11 @@ void FocusControl::cycleFocus(const FocusableList &window_list,
110 Focusables::const_iterator it_end = window_list.clientList().end(); 110 Focusables::const_iterator it_end = window_list.clientList().end();
111 111
112 // too many things can go wrong with remembering this 112 // too many things can go wrong with remembering this
113 m_cycling_window = find(it_begin, it_end, s_focused_window); 113 m_cycling_window = it_end;
114 if (m_cycling_next)
115 m_cycling_window = find(it_begin, it_end, m_cycling_next);
116 if (m_cycling_window == it_end)
117 m_cycling_window = find(it_begin, it_end, s_focused_window);
114 if (m_cycling_window == it_end) 118 if (m_cycling_window == it_end)
115 m_cycling_window = find(it_begin, it_end, s_focused_fbwindow); 119 m_cycling_window = find(it_begin, it_end, s_focused_fbwindow);
116 120
@@ -144,6 +148,7 @@ void FocusControl::cycleFocus(const FocusableList &window_list,
144 // now we actually try to focus the window 148 // now we actually try to focus the window
145 if (!doSkipWindow(**it, pat) && (m_cycling_next = *it) && (*it)->focus()) 149 if (!doSkipWindow(**it, pat) && (m_cycling_next = *it) && (*it)->focus())
146 break; 150 break;
151 m_cycling_next = 0;
147 } 152 }
148 m_cycling_window = it; 153 m_cycling_window = it;
149 154