all repos — fluxbox @ 74454c8f2a8f1fcae493930a5a00cafab0959a4c

custom fork of the fluxbox windowmanager

Fixed lower/raise of windows when using keybindings/windowmenu
pekdon pekdon
commit

74454c8f2a8f1fcae493930a5a00cafab0959a4c

parent

b0d1c04c119711167fccd1b30e266269a0e2262c

6 files changed, 43 insertions(+), 8 deletions(-)

jump to
M ChangeLogChangeLog

@@ -7,6 +7,8 @@ *02/01/16:

* Fixed indent in Window.hh *02/01/15: * Fixed exception in FluxboxWindow::FluxboxWindow + * Fixed lower/raise of windows when using windowmenu/keybinding + so now tabs should follow. (Claes Nästén) *02/01/14: * Fixed throw statement in FluxboxWindow
M src/Tab.ccsrc/Tab.cc

@@ -19,7 +19,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: Tab.cc,v 1.14 2002/01/09 14:11:20 fluxgen Exp $ +// $Id: Tab.cc,v 1.15 2002/01/18 18:28:17 pekdon Exp $ #include "Tab.hh"

@@ -155,6 +155,27 @@ first = getFirst(this);

//raise tabs for (; first!=0; first = first->m_next) m_win->getScreen()->raiseWindows(&first->m_tabwin, 1); +} + +//-------------- lower -------------------- +// Lowers the tabs in the tablist AND +// the windows the tabs relate to +//----------------------------------------- +void Tab::lower() { + Tab *current = this; + FluxboxWindow *win = 0; //convinence + //this have to be done in the correct order, otherwise we'll switch the window + //beeing ontop in the group + do { + XLowerWindow(m_display, current->m_tabwin); //lower tabwin and tabs window + win = current->getWindow(); + win->getScreen()->getWorkspace(win->getWorkspaceNumber())->lowerWindow(win); + + current = current->next(); //get next + if (current == 0) + current = getFirst(this); //there weren't any after, get the first + + } while (current != this); } //-------------- loadTheme -----------------
M src/Tab.hhsrc/Tab.hh

@@ -19,7 +19,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: Tab.hh,v 1.6 2002/01/11 09:44:35 fluxgen Exp $ +// $Id: Tab.hh,v 1.7 2002/01/18 18:28:17 pekdon Exp $ #ifndef _TAB_HH_ #define _TAB_HH_

@@ -55,6 +55,7 @@ void decorate();

void deiconify(); void iconify(); void raise(); + void lower(); void withdraw(); void stick(); void resize();
M src/Window.ccsrc/Window.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: Window.cc,v 1.20 2002/01/18 01:25:58 fluxgen Exp $ +// $Id: Window.cc,v 1.21 2002/01/18 18:28:17 pekdon Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library

@@ -2834,13 +2834,15 @@

if (windowmenu && windowmenu->isVisible()) windowmenu->hide(); //raise tab first if there is any - if (tab) + if (hasTab()) tab->raise(); screen->getWorkspace(workspace_number)->raiseWindow(this); } } else if (be->button == 2 && be->window == frame.label) { screen->getWorkspace(workspace_number)->lowerWindow(this); + if (hasTab()) + getTab()->lower(); //lower the tab AND it's windows } else if (windowmenu && be->button == 3 && (frame.title == be->window || frame.label == be->window ||
M src/Windowmenu.ccsrc/Windowmenu.cc

@@ -200,12 +200,16 @@ break;

case BScreen::WINDOWRAISE: hide(); + if (window->hasTab()) + window->getTab()->raise(); //raise tabs screen->getWorkspace(window->getWorkspaceNumber())->raiseWindow(window); break; case BScreen::WINDOWLOWER: hide(); - screen->getWorkspace(window->getWorkspaceNumber())->lowerWindow(window); + screen->getWorkspace(window->getWorkspaceNumber())->lowerWindow(window); + if (window->hasTab()) + window->getTab()->lower(); //lower tabs AND all it's windows break; case BScreen::WINDOWSTICK:
M src/fluxbox.ccsrc/fluxbox.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: fluxbox.cc,v 1.21 2002/01/18 01:23:54 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.22 2002/01/18 18:28:17 pekdon Exp $ // stupid macros needed to access some functions in version 2 of the GNU C // library

@@ -1154,10 +1154,15 @@ case Keys::ICONIFY:

focused_window->iconify(); break; case Keys::RAISE: - focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->raiseWindow(focused_window); + if (focused_window->hasTab()) + focused_window->getTab()->raise(); //raise the tabs if we have any + focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->raiseWindow(focused_window); break; case Keys::LOWER: - XLowerWindow(getXDisplay(), focused_window->getFrameWindow()); + focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->lowerWindow(focused_window); + if (focused_window->hasTab()) + focused_window->getTab()->lower(); //lower the tabs AND it's windows + break; case Keys::CLOSE: focused_window->close();