diff options
-rw-r--r-- | src/Window.cc | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/src/Window.cc b/src/Window.cc index 02a9d7f..7ea594a 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -953,13 +953,13 @@ FluxboxWindow::ClientList::iterator FluxboxWindow::getClientInsertPosition(int x | |||
953 | &labelbutton)) | 953 | &labelbutton)) |
954 | return m_clientlist.end(); | 954 | return m_clientlist.end(); |
955 | 955 | ||
956 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); | 956 | Client2ButtonMap::iterator it = |
957 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); | 957 | find_if(m_labelbuttons.begin(), |
958 | // find the label button to move next to | 958 | m_labelbuttons.end(), |
959 | for (; it != it_end; it++) { | 959 | Compose(bind2nd(equal_to<Window>(), labelbutton), |
960 | if ((*it).second->window() == labelbutton) | 960 | Compose(mem_fun(&TextButton::window), |
961 | break; | 961 | Select2nd<Client2ButtonMap::value_type>()))); |
962 | } | 962 | |
963 | 963 | ||
964 | // label button not found | 964 | // label button not found |
965 | if (it == m_labelbuttons.end()) | 965 | if (it == m_labelbuttons.end()) |
@@ -993,16 +993,16 @@ void FluxboxWindow::moveClientTo(WinClient &win, int x, int y) { | |||
993 | x, y, &dest_x, &dest_y, | 993 | x, y, &dest_x, &dest_y, |
994 | &labelbutton)) | 994 | &labelbutton)) |
995 | return; | 995 | return; |
996 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); | 996 | |
997 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); | 997 | Client2ButtonMap::iterator it = |
998 | //find the label button to move next to | 998 | find_if(m_labelbuttons.begin(), |
999 | for (; it != it_end; it++) { | 999 | m_labelbuttons.end(), |
1000 | if ((*it).second->window() == labelbutton) | 1000 | Compose(bind2nd(equal_to<Window>(), labelbutton), |
1001 | break; | 1001 | Compose(mem_fun(&TextButton::window), |
1002 | } | 1002 | Select2nd<Client2ButtonMap::value_type>()))); |
1003 | 1003 | ||
1004 | // label button not found | 1004 | // label button not found |
1005 | if (it == it_end) | 1005 | if (it == m_labelbuttons.end()) |
1006 | return; | 1006 | return; |
1007 | 1007 | ||
1008 | Window child_return = 0; | 1008 | Window child_return = 0; |
@@ -2766,14 +2766,15 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2766 | WinClient *client = 0; | 2766 | WinClient *client = 0; |
2767 | if (!inside_titlebar) { | 2767 | if (!inside_titlebar) { |
2768 | // determine if we're in titlebar | 2768 | // determine if we're in titlebar |
2769 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); | 2769 | Client2ButtonMap::iterator it = |
2770 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); | 2770 | find_if(m_labelbuttons.begin(), |
2771 | for (; it != it_end; ++it) { | 2771 | m_labelbuttons.end(), |
2772 | if ((*it).second->window() == me.window) { | 2772 | Compose(bind2nd(equal_to<Window>(), me.window), |
2773 | inside_titlebar = true; | 2773 | Compose(mem_fun(&TextButton::window), |
2774 | client = (*it).first; | 2774 | Select2nd<Client2ButtonMap::value_type>()))); |
2775 | break; | 2775 | if (it != m_labelbuttons.end()) { |
2776 | } | 2776 | inside_titlebar = true; |
2777 | client = (*it).first; | ||
2777 | } | 2778 | } |
2778 | } | 2779 | } |
2779 | 2780 | ||
@@ -2984,14 +2985,15 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { | |||
2984 | // don't waste our time scanning if we aren't real sloppy focus | 2985 | // don't waste our time scanning if we aren't real sloppy focus |
2985 | if (screen().isSloppyFocus()) { | 2986 | if (screen().isSloppyFocus()) { |
2986 | // determine if we're in a label button (tab) | 2987 | // determine if we're in a label button (tab) |
2987 | Client2ButtonMap::iterator it = m_labelbuttons.begin(); | 2988 | Client2ButtonMap::iterator it = |
2988 | Client2ButtonMap::iterator it_end = m_labelbuttons.end(); | 2989 | find_if(m_labelbuttons.begin(), |
2989 | for (; it != it_end; ++it) { | 2990 | m_labelbuttons.end(), |
2990 | if ((*it).second->window() == ev.window) { | 2991 | Compose(bind2nd(equal_to<Window>(), ev.window), |
2991 | client = (*it).first; | 2992 | Compose(mem_fun(&TextButton::window), |
2992 | break; | 2993 | Select2nd<Client2ButtonMap::value_type>()))); |
2993 | } | 2994 | if (it != m_labelbuttons.end()) |
2994 | } | 2995 | client = (*it).first; |
2996 | |||
2995 | } | 2997 | } |
2996 | if (ev.window == frame().window() || | 2998 | if (ev.window == frame().window() || |
2997 | ev.window == m_client->window() || | 2999 | ev.window == m_client->window() || |