aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 27992f0..4e02bfe 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -777,36 +777,14 @@ void FluxboxWindow::nextClient() {
777 if (numClients() <= 1) 777 if (numClients() <= 1)
778 return; 778 return;
779 779
780 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); 780 screen().focusControl().cycleFocus(&m_clientlist, 0);
781 WinClient *client = 0;
782 if (it == m_clientlist.end()) {
783 client = m_clientlist.front();
784 } else {
785 it++;
786 if (it == m_clientlist.end())
787 client = m_clientlist.front();
788 else
789 client = *it;
790 }
791 setCurrentClient(*client, true);
792} 781}
793 782
794void FluxboxWindow::prevClient() { 783void FluxboxWindow::prevClient() {
795 if (numClients() <= 1) 784 if (numClients() <= 1)
796 return; 785 return;
797 786
798 ClientList::iterator it = find(m_clientlist.begin(), m_clientlist.end(), m_client); 787 screen().focusControl().cycleFocus(&m_clientlist, 0, true);
799 WinClient *client = 0;
800 if (it == m_clientlist.end()) {
801 client = m_clientlist.front();
802 } else {
803 if (it == m_clientlist.begin())
804 client = m_clientlist.back();
805 else
806 client = *(--it);
807 }
808
809 setCurrentClient(*client, true);
810} 788}
811 789
812 790
@@ -3909,8 +3887,6 @@ void FluxboxWindow::setupWindow() {
3909 // sets up our window 3887 // sets up our window
3910 // we allow both to be done at once to share the commands 3888 // we allow both to be done at once to share the commands
3911 3889
3912 WinButtonTheme &winbutton_theme = screen().winButtonTheme();
3913
3914 using namespace FbTk; 3890 using namespace FbTk;
3915 typedef RefCount<Command> CommandRef; 3891 typedef RefCount<Command> CommandRef;
3916 typedef SimpleCommand<FluxboxWindow> WindowCmd; 3892 typedef SimpleCommand<FluxboxWindow> WindowCmd;
@@ -4024,7 +4000,7 @@ void FluxboxWindow::updateButtons() {
4024 if (new_size != m_titlebar_buttons[i].size() || need_update) 4000 if (new_size != m_titlebar_buttons[i].size() || need_update)
4025 need_update = true; 4001 need_update = true;
4026 else { 4002 else {
4027 for (int j=0; j < new_size && !need_update; j++) { 4003 for (size_t j=0; j < new_size && !need_update; j++) {
4028 if ((*(*titlebar_side[i]))[j] != m_titlebar_buttons[i][j]) 4004 if ((*(*titlebar_side[i]))[j] != m_titlebar_buttons[i][j])
4029 need_update = true; 4005 need_update = true;
4030 } 4006 }