diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/src/Window.cc b/src/Window.cc index b33bcbe..972a025 100644 --- a/src/Window.cc +++ b/src/Window.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: Window.cc,v 1.228 2003/09/14 10:13:06 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.229 2003/09/14 11:23:47 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -806,19 +806,17 @@ void FluxboxWindow::nextClient() { | |||
806 | return; | 806 | return; |
807 | 807 | ||
808 | ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); | 808 | ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); |
809 | WinClient *client = 0; | ||
809 | if (it == m_clientlist.end()) { | 810 | if (it == m_clientlist.end()) { |
810 | m_client = m_clientlist.front(); | 811 | client = m_clientlist.front(); |
811 | return; | 812 | } else { |
813 | it++; | ||
814 | if (it == m_clientlist.end()) | ||
815 | client = m_clientlist.front(); | ||
816 | else | ||
817 | client = *it; | ||
812 | } | 818 | } |
813 | 819 | setCurrentClient(*client, true); | |
814 | it++; | ||
815 | if (it == m_clientlist.end()) | ||
816 | m_client = m_clientlist.front(); | ||
817 | else | ||
818 | m_client = *it; | ||
819 | m_client->raise(); | ||
820 | frame().setLabelButtonFocus(*m_labelbuttons[m_client]); | ||
821 | frame().setFocus(setInputFocus()); | ||
822 | } | 820 | } |
823 | 821 | ||
824 | void FluxboxWindow::prevClient() { | 822 | void FluxboxWindow::prevClient() { |
@@ -826,18 +824,17 @@ void FluxboxWindow::prevClient() { | |||
826 | return; | 824 | return; |
827 | 825 | ||
828 | ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); | 826 | ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); |
827 | WinClient *client = 0; | ||
829 | if (it == m_clientlist.end()) { | 828 | if (it == m_clientlist.end()) { |
830 | m_client = m_clientlist.front(); | 829 | client = m_clientlist.front(); |
831 | return; | 830 | } else { |
831 | if (it == m_clientlist.begin()) | ||
832 | client = m_clientlist.back(); | ||
833 | else | ||
834 | client = *(--it); | ||
832 | } | 835 | } |
833 | if (it == m_clientlist.begin()) | ||
834 | m_client = m_clientlist.back(); | ||
835 | else | ||
836 | m_client = *(--it); | ||
837 | 836 | ||
838 | m_client->raise(); | 837 | setCurrentClient(*client, true); |
839 | frame().setLabelButtonFocus(*m_labelbuttons[m_client]); | ||
840 | frame().setFocus(setInputFocus()); | ||
841 | } | 838 | } |
842 | 839 | ||
843 | 840 | ||