all repos — fluxbox @ 1856480901f1aed0235300f17ebcf827c9bf9aac

custom fork of the fluxbox windowmanager

fix up nextFocus/prevFocu for cycling through groups (not just clients)
rathnor rathnor
commit

1856480901f1aed0235300f17ebcf827c9bf9aac

parent

97fcf60f46000fc2770a00ed4a76df90f13d9ab3

2 files changed, 15 insertions(+), 13 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.181 2003/06/12 15:24:37 fluxgen Exp $ +// $Id: Screen.cc,v 1.182 2003/06/15 11:37:53 rathnor Exp $ #include "Screen.hh"

@@ -1536,7 +1536,7 @@

// keep track of the originally selected window in a set WinClient &last_client = fbwin->winClient(); - if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) { + if (! (doSkipWindow(**it, opts) || !fbwin->setCurrentClient(**it)) ) { // moved onto a new fbwin if (!cycling_last || cycling_last->fbwindow() != fbwin) { if (cycling_last)

@@ -1566,7 +1566,7 @@ ++it;

if (it == wins.end()) it = wins.begin(); // see if the window should be skipped - if (! (doSkipWindow((*it), opts) || !(*it)->setInputFocus()) ) + if (! (doSkipWindow((*it)->winClient(), opts) || !(*it)->setInputFocus()) ) break; } while ((*it) != focused); if ((*it) != focused && it != wins.end())

@@ -1627,7 +1627,7 @@ // keep track of the originally selected window in a set

WinClient &last_client = fbwin->winClient(); - if (! (doSkipWindow(fbwin, opts) || !fbwin->setCurrentClient(**it)) ) { + if (! (doSkipWindow(**it, opts) || !fbwin->setCurrentClient(**it)) ) { // moved onto a new fbwin if (!cycling_last || cycling_last->fbwindow() != fbwin) { if (cycling_last)

@@ -1659,7 +1659,7 @@ if (it == wins.begin())

it = wins.end(); --it; // see if the window should be skipped - if (! (doSkipWindow((*it), opts) || !(*it)->setInputFocus()) ) + if (! (doSkipWindow((*it)->winClient(), opts) || !(*it)->setInputFocus()) ) break; } while ((*it) != focused);

@@ -2411,11 +2411,13 @@

/** @return true if the windows should be skiped else false */ -bool BScreen::doSkipWindow(const FluxboxWindow *w, int opts) { - return ((opts & CYCLESKIPSTUCK) != 0 && w->isStuck() || // skip if stuck - /* (opts & CYCLESKIPLOWERTABS) != 0 && w->isLowerTab() || // skip if lower tab - */ - (opts & CYCLESKIPSHADED) != 0 && w->isShaded()); // skip if shaded +bool BScreen::doSkipWindow(const WinClient &winclient, int opts) { + const FluxboxWindow *win = winclient.fbwindow(); + return (!win || + (opts & CYCLESKIPSTUCK) != 0 && win->isStuck() || // skip if stuck + (opts & CYCLEGROUPS) != 0 && win->winClient() != winclient || // skip if not active client (i.e. only visit each fbwin once) + (opts & CYCLESKIPSHADED) != 0 && win->isShaded() // skip if shaded + ); } void BScreen::renderGeomWindow() {
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.104 2003/06/12 15:22:59 fluxgen Exp $ +// $Id: Screen.hh,v 1.105 2003/06/15 11:37:53 rathnor Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -339,7 +339,7 @@ enum { ROWSMARTPLACEMENT = 1, COLSMARTPLACEMENT, CASCADEPLACEMENT,

UNDERMOUSEPLACEMENT, LEFTRIGHT, RIGHTLEFT, TOPBOTTOM, BOTTOMTOP }; // prevFocus/nextFocus option bits - enum { CYCLESKIPLOWERTABS = 0x01, CYCLESKIPSTUCK = 0x02, CYCLESKIPSHADED = 0x04, + enum { CYCLEGROUPS = 0x01, CYCLESKIPSTUCK = 0x02, CYCLESKIPSHADED = 0x04, CYCLELINEAR = 0x08, CYCLEDEFAULT = 0x00 }; class ScreenSubject:public FbTk::Subject {

@@ -359,7 +359,7 @@ bool parseMenuFile(std::ifstream &filestream, FbTk::Menu &menu, int &row);

void initMenu(); - bool doSkipWindow(const FluxboxWindow *w, int options); + bool doSkipWindow(const WinClient &winclient, int options); void renderGeomWindow();