Fixed lower/raise of windows when using keybindings/windowmenu
pekdon pekdon
6 files changed,
43 insertions(+),
8 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -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.cc
→
src/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.hh
→
src/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.cc
→
src/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/fluxbox.cc
→
src/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();