aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-10-24 17:09:26 (GMT)
committermarkt <markt>2007-10-24 17:09:26 (GMT)
commitf3afe787c1209cf1357493924a4f7eb7864def54 (patch)
treed0c0c3eca154ab538fbc1fb3c62081e9250c05bd /src/FocusControl.cc
parent74eb584a312aba21b21eccb6c49ade1571aa3740 (diff)
downloadfluxbox_pavel-f3afe787c1209cf1357493924a4f7eb7864def54.zip
fluxbox_pavel-f3afe787c1209cf1357493924a4f7eb7864def54.tar.bz2
introduced workspacename for ClientPattern, and some miscellaneous cleanup
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 6ccc9a1..2ab51eb 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -86,8 +86,8 @@ FocusControl::FocusControl(BScreen &screen):
86 86
87} 87}
88 88
89void FocusControl::cycleFocus(Focusables &window_list, const ClientPattern *pat, 89void FocusControl::cycleFocus(const Focusables &window_list,
90 bool cycle_reverse) { 90 const ClientPattern *pat, bool cycle_reverse) {
91 91
92 if (!m_cycling_list) { 92 if (!m_cycling_list) {
93 if (&m_screen == FbTk::EventManager::instance()->grabbingKeyboard()) 93 if (&m_screen == FbTk::EventManager::instance()->grabbingKeyboard())
@@ -98,15 +98,15 @@ void FocusControl::cycleFocus(Focusables &window_list, const ClientPattern *pat,
98 } else if (m_cycling_list != &window_list) 98 } else if (m_cycling_list != &window_list)
99 m_cycling_list = &window_list; 99 m_cycling_list = &window_list;
100 100
101 Focusables::iterator it_begin = window_list.begin(); 101 Focusables::const_iterator it_begin = window_list.begin();
102 Focusables::iterator it_end = window_list.end(); 102 Focusables::const_iterator it_end = window_list.end();
103 103
104 // too many things can go wrong with remembering this 104 // too many things can go wrong with remembering this
105 m_cycling_window = find(it_begin, it_end, s_focused_window); 105 m_cycling_window = find(it_begin, it_end, s_focused_window);
106 if (m_cycling_window == it_end) 106 if (m_cycling_window == it_end)
107 m_cycling_window = find(it_begin, it_end, s_focused_fbwindow); 107 m_cycling_window = find(it_begin, it_end, s_focused_fbwindow);
108 108
109 Focusables::iterator it = m_cycling_window; 109 Focusables::const_iterator it = m_cycling_window;
110 FluxboxWindow *fbwin = 0; 110 FluxboxWindow *fbwin = 0;
111 WinClient *last_client = 0; 111 WinClient *last_client = 0;
112 WinClient *was_iconic = 0; 112 WinClient *was_iconic = 0;
@@ -167,12 +167,12 @@ void FocusControl::cycleFocus(Focusables &window_list, const ClientPattern *pat,
167 167
168} 168}
169 169
170void FocusControl::goToWindowNumber(Focusables &winlist, int num, 170void FocusControl::goToWindowNumber(const Focusables &winlist, int num,
171 const ClientPattern *pat) { 171 const ClientPattern *pat) {
172 Focusable *last_matched = 0; 172 Focusable *last_matched = 0;
173 if (num > 0) { 173 if (num > 0) {
174 Focusables::iterator it = winlist.begin(); 174 Focusables::const_iterator it = winlist.begin();
175 Focusables::iterator it_end = winlist.end(); 175 Focusables::const_iterator it_end = winlist.end();
176 for (; it != it_end; ++it) { 176 for (; it != it_end; ++it) {
177 if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { 177 if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) {
178 --num; 178 --num;
@@ -181,8 +181,8 @@ void FocusControl::goToWindowNumber(Focusables &winlist, int num,
181 } 181 }
182 } 182 }
183 } else if (num < 0) { 183 } else if (num < 0) {
184 Focusables::reverse_iterator it = winlist.rbegin(); 184 Focusables::const_reverse_iterator it = winlist.rbegin();
185 Focusables::reverse_iterator it_end = winlist.rend(); 185 Focusables::const_reverse_iterator it_end = winlist.rend();
186 for (; it != it_end; ++it) { 186 for (; it != it_end; ++it) {
187 if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { 187 if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) {
188 ++num; 188 ++num;
@@ -255,7 +255,7 @@ void FocusControl::stopCyclingFocus() {
255 if (m_cycling_list == 0) 255 if (m_cycling_list == 0)
256 return; 256 return;
257 257
258 Focusables::iterator it_end = m_cycling_list->end(); 258 Focusables::const_iterator it_end = m_cycling_list->end();
259 m_cycling_last = 0; 259 m_cycling_last = 0;
260 m_cycling_list = 0; 260 m_cycling_list = 0;
261 261