Fixed lower/raise of windows when using keybindings/windowmenu
This commit is contained in:
parent
b0d1c04c11
commit
74454c8f2a
6 changed files with 43 additions and 8 deletions
|
@ -7,6 +7,8 @@ Changes for 0.1.7:
|
|||
* 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
|
||||
|
||||
|
|
23
src/Tab.cc
23
src/Tab.cc
|
@ -19,7 +19,7 @@
|
|||
// 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"
|
||||
|
||||
|
@ -157,6 +157,27 @@ void Tab::raise() {
|
|||
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 -----------------
|
||||
// loads the texture with the correct
|
||||
// width and height, this is necessary in
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// 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 @@ public:
|
|||
void deiconify();
|
||||
void iconify();
|
||||
void raise();
|
||||
void lower();
|
||||
void withdraw();
|
||||
void stick();
|
||||
void resize();
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) {
|
|||
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 ||
|
||||
|
|
|
@ -200,12 +200,16 @@ void Windowmenu::itemSelected(int button, int index) {
|
|||
|
||||
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:
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Fluxbox::doWindowAction(Keys::KeyAction action) {
|
|||
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();
|
||||
|
|
Loading…
Reference in a new issue