aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-06-15 11:37:53 (GMT)
committerrathnor <rathnor>2003-06-15 11:37:53 (GMT)
commit1856480901f1aed0235300f17ebcf827c9bf9aac (patch)
treeebc6900a790ce2fefb1f828b84ec597d65a34b0d /src/Screen.cc
parent97fcf60f46000fc2770a00ed4a76df90f13d9ab3 (diff)
downloadfluxbox-1856480901f1aed0235300f17ebcf827c9bf9aac.zip
fluxbox-1856480901f1aed0235300f17ebcf827c9bf9aac.tar.bz2
fix up nextFocus/prevFocu for cycling through groups (not just clients)
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 85fdec9..8b76dba 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.181 2003/06/12 15:24:37 fluxgen Exp $ 25// $Id: Screen.cc,v 1.182 2003/06/15 11:37:53 rathnor Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -1536,7 +1536,7 @@ void BScreen::nextFocus(int opts) {
1536 // keep track of the originally selected window in a set 1536 // keep track of the originally selected window in a set
1537 WinClient &last_client = fbwin->winClient(); 1537 WinClient &last_client = fbwin->winClient();
1538 1538
1539 if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) { 1539 if (! (doSkipWindow(**it, opts) || !fbwin->setCurrentClient(**it)) ) {
1540 // moved onto a new fbwin 1540 // moved onto a new fbwin
1541 if (!cycling_last || cycling_last->fbwindow() != fbwin) { 1541 if (!cycling_last || cycling_last->fbwindow() != fbwin) {
1542 if (cycling_last) 1542 if (cycling_last)
@@ -1566,7 +1566,7 @@ void BScreen::nextFocus(int opts) {
1566 if (it == wins.end()) 1566 if (it == wins.end())
1567 it = wins.begin(); 1567 it = wins.begin();
1568 // see if the window should be skipped 1568 // see if the window should be skipped
1569 if (! (doSkipWindow((*it), opts) || !(*it)->setInputFocus()) ) 1569 if (! (doSkipWindow((*it)->winClient(), opts) || !(*it)->setInputFocus()) )
1570 break; 1570 break;
1571 } while ((*it) != focused); 1571 } while ((*it) != focused);
1572 if ((*it) != focused && it != wins.end()) 1572 if ((*it) != focused && it != wins.end())
@@ -1627,7 +1627,7 @@ void BScreen::prevFocus(int opts) {
1627 WinClient &last_client = fbwin->winClient(); 1627 WinClient &last_client = fbwin->winClient();
1628 1628
1629 1629
1630 if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) { 1630 if (! (doSkipWindow(**it, opts) || !fbwin->setCurrentClient(**it)) ) {
1631 // moved onto a new fbwin 1631 // moved onto a new fbwin
1632 if (!cycling_last || cycling_last->fbwindow() != fbwin) { 1632 if (!cycling_last || cycling_last->fbwindow() != fbwin) {
1633 if (cycling_last) 1633 if (cycling_last)
@@ -1659,7 +1659,7 @@ void BScreen::prevFocus(int opts) {
1659 it = wins.end(); 1659 it = wins.end();
1660 --it; 1660 --it;
1661 // see if the window should be skipped 1661 // see if the window should be skipped
1662 if (! (doSkipWindow((*it), opts) || !(*it)->setInputFocus()) ) 1662 if (! (doSkipWindow((*it)->winClient(), opts) || !(*it)->setInputFocus()) )
1663 break; 1663 break;
1664 } while ((*it) != focused); 1664 } while ((*it) != focused);
1665 1665
@@ -2411,11 +2411,13 @@ void BScreen::leftWorkspace(const int delta) {
2411/** 2411/**
2412 @return true if the windows should be skiped else false 2412 @return true if the windows should be skiped else false
2413*/ 2413*/
2414bool BScreen::doSkipWindow(const FluxboxWindow *w, int opts) { 2414bool BScreen::doSkipWindow(const WinClient &winclient, int opts) {
2415 return ((opts & CYCLESKIPSTUCK) != 0 && w->isStuck() || // skip if stuck 2415 const FluxboxWindow *win = winclient.fbwindow();
2416 /* (opts & CYCLESKIPLOWERTABS) != 0 && w->isLowerTab() || // skip if lower tab 2416 return (!win ||
2417 */ 2417 (opts & CYCLESKIPSTUCK) != 0 && win->isStuck() || // skip if stuck
2418 (opts & CYCLESKIPSHADED) != 0 && w->isShaded()); // skip if shaded 2418 (opts & CYCLEGROUPS) != 0 && win->winClient() != winclient || // skip if not active client (i.e. only visit each fbwin once)
2419 (opts & CYCLESKIPSHADED) != 0 && win->isShaded() // skip if shaded
2420 );
2419} 2421}
2420 2422
2421void BScreen::renderGeomWindow() { 2423void BScreen::renderGeomWindow() {