diff options
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index b2a1dbb..e6099aa 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: fluxbox.cc,v 1.231 2004/02/20 09:29:05 fluxgen Exp $ | 25 | // $Id: fluxbox.cc,v 1.232 2004/02/27 12:30:17 fluxgen Exp $ |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | 28 | ||
@@ -48,6 +48,7 @@ | |||
48 | #include "FbTk/Command.hh" | 48 | #include "FbTk/Command.hh" |
49 | #include "FbTk/RefCount.hh" | 49 | #include "FbTk/RefCount.hh" |
50 | #include "FbTk/SimpleCommand.hh" | 50 | #include "FbTk/SimpleCommand.hh" |
51 | #include "FbTk/CompareEqual.hh" | ||
51 | 52 | ||
52 | //Use GNU extensions | 53 | //Use GNU extensions |
53 | #ifndef _GNU_SOURCE | 54 | #ifndef _GNU_SOURCE |
@@ -837,14 +838,11 @@ void Fluxbox::handleEvent(XEvent * const e) { | |||
837 | screen_num = XScreenNumberOfScreen(attr.screen); | 838 | screen_num = XScreenNumberOfScreen(attr.screen); |
838 | 839 | ||
839 | // find screen | 840 | // find screen |
840 | ScreenList::iterator screen_it = m_screen_list.begin(); | 841 | ScreenList::iterator screen_it = find_if(m_screen_list.begin(), |
841 | const ScreenList::iterator screen_it_end = m_screen_list.end(); | 842 | m_screen_list.end(), |
842 | for (; screen_it != screen_it_end; ++screen_it) { | 843 | FbTk::CompareEqual<BScreen>(&BScreen::screenNumber, screen_num)); |
843 | if ((*screen_it)->screenNumber() == screen_num) { | 844 | if (screen_it != m_screen_list.end()) |
844 | screen = (*screen_it); | 845 | screen = *screen_it; |
845 | break; | ||
846 | } | ||
847 | } | ||
848 | } | 846 | } |
849 | // try with parent if we failed to find screen num | 847 | // try with parent if we failed to find screen num |
850 | if (screen == 0) | 848 | if (screen == 0) |
@@ -1435,11 +1433,12 @@ void Fluxbox::attachSignals(WinClient &winclient) { | |||
1435 | } | 1433 | } |
1436 | 1434 | ||
1437 | BScreen *Fluxbox::searchScreen(Window window) { | 1435 | BScreen *Fluxbox::searchScreen(Window window) { |
1438 | ScreenList::iterator it = m_screen_list.begin(); | 1436 | |
1437 | ScreenList::iterator it = m_screen_list.begin(); | ||
1439 | ScreenList::iterator it_end = m_screen_list.end(); | 1438 | ScreenList::iterator it_end = m_screen_list.end(); |
1440 | for (; it != it_end; ++it) { | 1439 | for (; it != it_end; ++it) { |
1441 | if (*it && (*it)->rootWindow() == window) | 1440 | if (*it && (*it)->rootWindow() == window) |
1442 | return (*it); | 1441 | return *it; |
1443 | } | 1442 | } |
1444 | 1443 | ||
1445 | return 0; | 1444 | return 0; |