diff options
author | markt <markt> | 2007-07-02 05:27:21 (GMT) |
---|---|---|
committer | markt <markt> | 2007-07-02 05:27:21 (GMT) |
commit | 295c929f984a5dbc54d9672e092e79abcf0f227a (patch) | |
tree | 7e54b5d70554aa2704d14c9388b18d0c9bab8b4e /src | |
parent | 4e5e7668504ee511b0a422df08f2338f3f68e0fe (diff) | |
download | fluxbox-295c929f984a5dbc54d9672e092e79abcf0f227a.zip fluxbox-295c929f984a5dbc54d9672e092e79abcf0f227a.tar.bz2 |
minor usability fix for :Tab and :GoToWindow commands
fixed handle rendering when switching from a style without them
Diffstat (limited to 'src')
-rw-r--r-- | src/CurrentWindowCmd.cc | 7 | ||||
-rw-r--r-- | src/FbWinFrame.cc | 5 | ||||
-rw-r--r-- | src/FocusControl.cc | 14 |
3 files changed, 13 insertions, 13 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc index f411f83..4a60e63 100644 --- a/src/CurrentWindowCmd.cc +++ b/src/CurrentWindowCmd.cc | |||
@@ -94,9 +94,10 @@ void TakeToPrevWorkspaceCmd::real_execute() { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | void GoToTabCmd::real_execute() { | 96 | void GoToTabCmd::real_execute() { |
97 | int num = m_tab_num + (m_tab_num > 0 ? 0 : fbwindow().numClients() + 1); | 97 | int num = m_tab_num; |
98 | if (num < 1 || num > fbwindow().numClients()) | 98 | if (num < 0) num += fbwindow().numClients() + 1; |
99 | return; | 99 | if (num < 1) num = 1; |
100 | if (num > fbwindow().numClients()) num = fbwindow().numClients(); | ||
100 | 101 | ||
101 | FluxboxWindow::ClientList::iterator it = fbwindow().clientList().begin(); | 102 | FluxboxWindow::ClientList::iterator it = fbwindow().clientList().begin(); |
102 | 103 | ||
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index a387744..6f9c86e 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -789,10 +789,11 @@ bool FbWinFrame::showHandle() { | |||
789 | if (m_use_handle || theme().handleWidth() == 0) | 789 | if (m_use_handle || theme().handleWidth() == 0) |
790 | return false; | 790 | return false; |
791 | 791 | ||
792 | m_use_handle = true; | ||
793 | |||
792 | // weren't previously rendered... | 794 | // weren't previously rendered... |
793 | renderHandles(); | 795 | renderHandles(); |
794 | 796 | applyHandles(); | |
795 | m_use_handle = true; | ||
796 | 797 | ||
797 | m_handle.show(); | 798 | m_handle.show(); |
798 | m_handle.showSubwindows(); // shows grips | 799 | m_handle.showSubwindows(); // shows grips |
diff --git a/src/FocusControl.cc b/src/FocusControl.cc index 8706752..47a0a71 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc | |||
@@ -169,16 +169,15 @@ void FocusControl::cycleFocus(Focusables &window_list, const ClientPattern *pat, | |||
169 | 169 | ||
170 | void FocusControl::goToWindowNumber(Focusables &winlist, int num, | 170 | void FocusControl::goToWindowNumber(Focusables &winlist, int num, |
171 | const ClientPattern *pat) { | 171 | const ClientPattern *pat) { |
172 | Focusable *last_matched = 0; | ||
172 | if (num > 0) { | 173 | if (num > 0) { |
173 | Focusables::iterator it = winlist.begin(); | 174 | Focusables::iterator it = winlist.begin(); |
174 | Focusables::iterator it_end = winlist.end(); | 175 | Focusables::iterator it_end = winlist.end(); |
175 | for (; it != it_end; ++it) { | 176 | for (; it != it_end; ++it) { |
176 | if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { | 177 | if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { |
177 | --num; | 178 | --num; |
178 | if (!num) { | 179 | last_matched = *it; |
179 | (*it)->focus(); | 180 | if (!num) break; |
180 | return; | ||
181 | } | ||
182 | } | 181 | } |
183 | } | 182 | } |
184 | } else if (num < 0) { | 183 | } else if (num < 0) { |
@@ -187,13 +186,12 @@ void FocusControl::goToWindowNumber(Focusables &winlist, int num, | |||
187 | for (; it != it_end; ++it) { | 186 | for (; it != it_end; ++it) { |
188 | if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { | 187 | if (!doSkipWindow(**it, pat) && (*it)->acceptsFocus()) { |
189 | ++num; | 188 | ++num; |
190 | if (!num) { | 189 | last_matched = *it; |
191 | (*it)->focus(); | 190 | if (!num) break; |
192 | return; | ||
193 | } | ||
194 | } | 191 | } |
195 | } | 192 | } |
196 | } | 193 | } |
194 | if (last_matched) last_matched->focus(); | ||
197 | } | 195 | } |
198 | 196 | ||
199 | void FocusControl::addFocusBack(WinClient &client) { | 197 | void FocusControl::addFocusBack(WinClient &client) { |