diff options
Diffstat (limited to 'src/FocusableList.cc')
-rw-r--r-- | src/FocusableList.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/FocusableList.cc b/src/FocusableList.cc index 70f415e..d15e10a 100644 --- a/src/FocusableList.cc +++ b/src/FocusableList.cc | |||
@@ -286,10 +286,19 @@ void FocusableList::reset() { | |||
286 | 286 | ||
287 | bool FocusableList::contains(const Focusable &win) const { | 287 | bool FocusableList::contains(const Focusable &win) const { |
288 | Focusables::const_iterator it = m_list.begin(), it_end = m_list.end(); | 288 | Focusables::const_iterator it = m_list.begin(), it_end = m_list.end(); |
289 | it = find(it, it_end, &win); | 289 | it = std::find(it, it_end, &win); |
290 | return (it != it_end); | 290 | return (it != it_end); |
291 | } | 291 | } |
292 | 292 | ||
293 | Focusable *FocusableList::find(const ClientPattern &pat) const { | ||
294 | Focusables::const_iterator it = m_list.begin(), it_end = m_list.end(); | ||
295 | for (; it != it_end; ++it) { | ||
296 | if (pat.match(**it)) | ||
297 | return *it; | ||
298 | } | ||
299 | return 0; | ||
300 | } | ||
301 | |||
293 | void FocusableList::attachChild(FocusableList &child) const { | 302 | void FocusableList::attachChild(FocusableList &child) const { |
294 | m_addsig.attach(&child); | 303 | m_addsig.attach(&child); |
295 | m_removesig.attach(&child); | 304 | m_removesig.attach(&child); |