diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/Window.cc b/src/Window.cc index 82df391..153a9c1 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -996,34 +996,34 @@ void FluxboxWindow::moveClientLeftOf(WinClient &win, WinClient &dest) { | |||
996 | 996 | ||
997 | 997 | ||
998 | void FluxboxWindow::moveClientRightOf(WinClient &win, WinClient &dest) { | 998 | void FluxboxWindow::moveClientRightOf(WinClient &win, WinClient &dest) { |
999 | frame().moveLabelButtonRightOf(*m_labelbuttons[&win], *m_labelbuttons[&dest]); | 999 | frame().moveLabelButtonRightOf(*m_labelbuttons[&win], *m_labelbuttons[&dest]); |
1000 | 1000 | ||
1001 | ClientList::iterator it = find(m_clientlist.begin(), | 1001 | ClientList::iterator it = find(m_clientlist.begin(), |
1002 | m_clientlist.end(), | 1002 | m_clientlist.end(), |
1003 | &win); | 1003 | &win); |
1004 | ClientList::iterator new_pos = find(m_clientlist.begin(), | 1004 | ClientList::iterator new_pos = find(m_clientlist.begin(), |
1005 | m_clientlist.end(), | 1005 | m_clientlist.end(), |
1006 | &dest); | 1006 | &dest); |
1007 | 1007 | ||
1008 | // make sure we found them | 1008 | // make sure we found them |
1009 | if (it == m_clientlist.end() || new_pos==m_clientlist.end()) { | 1009 | if (it == m_clientlist.end() || new_pos==m_clientlist.end()) |
1010 | return; | 1010 | return; |
1011 | } | 1011 | |
1012 | //moving a button to the right of itself results in no change | 1012 | //moving a button to the right of itself results in no change |
1013 | if( new_pos == it) { | 1013 | if (new_pos == it) |
1014 | return; | 1014 | return; |
1015 | } | ||
1016 | //remove from list | ||
1017 | m_clientlist.erase(it); | ||
1018 | //need to insert into the next position | ||
1019 | new_pos++; | ||
1020 | //insert on the new place | ||
1021 | if(new_pos == m_clientlist.end()) | ||
1022 | m_clientlist.push_back(&win); | ||
1023 | else | ||
1024 | m_clientlist.insert(new_pos, &win); | ||
1025 | 1015 | ||
1026 | updateClientLeftWindow(); | 1016 | //remove from list |
1017 | m_clientlist.erase(it); | ||
1018 | //need to insert into the next position | ||
1019 | new_pos++; | ||
1020 | //insert on the new place | ||
1021 | if (new_pos == m_clientlist.end()) | ||
1022 | m_clientlist.push_back(&win); | ||
1023 | else | ||
1024 | m_clientlist.insert(new_pos, &win); | ||
1025 | |||
1026 | updateClientLeftWindow(); | ||
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | /// Update LEFT window atom on all clients. | 1029 | /// Update LEFT window atom on all clients. |