aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpekdon <pekdon>2002-01-18 18:28:17 (GMT)
committerpekdon <pekdon>2002-01-18 18:28:17 (GMT)
commit74454c8f2a8f1fcae493930a5a00cafab0959a4c (patch)
tree15a8d903952bfe9cbc984ba9bf459b459debe172
parentb0d1c04c119711167fccd1b30e266269a0e2262c (diff)
downloadfluxbox-74454c8f2a8f1fcae493930a5a00cafab0959a4c.zip
fluxbox-74454c8f2a8f1fcae493930a5a00cafab0959a4c.tar.bz2
Fixed lower/raise of windows when using keybindings/windowmenu
-rw-r--r--ChangeLog2
-rw-r--r--src/Tab.cc23
-rw-r--r--src/Tab.hh3
-rw-r--r--src/Window.cc6
-rw-r--r--src/Windowmenu.cc6
-rw-r--r--src/fluxbox.cc11
6 files changed, 43 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index fb7d990..6422eb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@ Changes for 0.1.7:
7 * Fixed indent in Window.hh 7 * Fixed indent in Window.hh
8*02/01/15: 8*02/01/15:
9 * Fixed exception in FluxboxWindow::FluxboxWindow 9 * Fixed exception in FluxboxWindow::FluxboxWindow
10 * Fixed lower/raise of windows when using windowmenu/keybinding
11 so now tabs should follow. (Claes Nästén)
10*02/01/14: 12*02/01/14:
11 * Fixed throw statement in FluxboxWindow 13 * Fixed throw statement in FluxboxWindow
12 14
diff --git a/src/Tab.cc b/src/Tab.cc
index 975c2d9..d05d7d5 100644
--- a/src/Tab.cc
+++ b/src/Tab.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Tab.cc,v 1.14 2002/01/09 14:11:20 fluxgen Exp $ 22// $Id: Tab.cc,v 1.15 2002/01/18 18:28:17 pekdon Exp $
23 23
24#include "Tab.hh" 24#include "Tab.hh"
25 25
@@ -157,6 +157,27 @@ void Tab::raise() {
157 m_win->getScreen()->raiseWindows(&first->m_tabwin, 1); 157 m_win->getScreen()->raiseWindows(&first->m_tabwin, 1);
158} 158}
159 159
160//-------------- lower --------------------
161// Lowers the tabs in the tablist AND
162// the windows the tabs relate to
163//-----------------------------------------
164void Tab::lower() {
165 Tab *current = this;
166 FluxboxWindow *win = 0; //convinence
167 //this have to be done in the correct order, otherwise we'll switch the window
168 //beeing ontop in the group
169 do {
170 XLowerWindow(m_display, current->m_tabwin); //lower tabwin and tabs window
171 win = current->getWindow();
172 win->getScreen()->getWorkspace(win->getWorkspaceNumber())->lowerWindow(win);
173
174 current = current->next(); //get next
175 if (current == 0)
176 current = getFirst(this); //there weren't any after, get the first
177
178 } while (current != this);
179}
180
160//-------------- loadTheme ----------------- 181//-------------- loadTheme -----------------
161// loads the texture with the correct 182// loads the texture with the correct
162// width and height, this is necessary in 183// width and height, this is necessary in
diff --git a/src/Tab.hh b/src/Tab.hh
index 53a3227..a0e3737 100644
--- a/src/Tab.hh
+++ b/src/Tab.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Tab.hh,v 1.6 2002/01/11 09:44:35 fluxgen Exp $ 22// $Id: Tab.hh,v 1.7 2002/01/18 18:28:17 pekdon Exp $
23 23
24#ifndef _TAB_HH_ 24#ifndef _TAB_HH_
25#define _TAB_HH_ 25#define _TAB_HH_
@@ -55,6 +55,7 @@ public:
55 void deiconify(); 55 void deiconify();
56 void iconify(); 56 void iconify();
57 void raise(); 57 void raise();
58 void lower();
58 void withdraw(); 59 void withdraw();
59 void stick(); 60 void stick();
60 void resize(); 61 void resize();
diff --git a/src/Window.cc b/src/Window.cc
index a7997c9..212a1c2 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.20 2002/01/18 01:25:58 fluxgen Exp $ 25// $Id: Window.cc,v 1.21 2002/01/18 18:28:17 pekdon Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -2834,13 +2834,15 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) {
2834 if (windowmenu && windowmenu->isVisible()) 2834 if (windowmenu && windowmenu->isVisible())
2835 windowmenu->hide(); 2835 windowmenu->hide();
2836 //raise tab first if there is any 2836 //raise tab first if there is any
2837 if (tab) 2837 if (hasTab())
2838 tab->raise(); 2838 tab->raise();
2839 2839
2840 screen->getWorkspace(workspace_number)->raiseWindow(this); 2840 screen->getWorkspace(workspace_number)->raiseWindow(this);
2841 } 2841 }
2842 } else if (be->button == 2 && be->window == frame.label) { 2842 } else if (be->button == 2 && be->window == frame.label) {
2843 screen->getWorkspace(workspace_number)->lowerWindow(this); 2843 screen->getWorkspace(workspace_number)->lowerWindow(this);
2844 if (hasTab())
2845 getTab()->lower(); //lower the tab AND it's windows
2844 2846
2845 } else if (windowmenu && be->button == 3 && 2847 } else if (windowmenu && be->button == 3 &&
2846 (frame.title == be->window || frame.label == be->window || 2848 (frame.title == be->window || frame.label == be->window ||
diff --git a/src/Windowmenu.cc b/src/Windowmenu.cc
index c776981..dcf6bd6 100644
--- a/src/Windowmenu.cc
+++ b/src/Windowmenu.cc
@@ -200,12 +200,16 @@ void Windowmenu::itemSelected(int button, int index) {
200 200
201 case BScreen::WINDOWRAISE: 201 case BScreen::WINDOWRAISE:
202 hide(); 202 hide();
203 if (window->hasTab())
204 window->getTab()->raise(); //raise tabs
203 screen->getWorkspace(window->getWorkspaceNumber())->raiseWindow(window); 205 screen->getWorkspace(window->getWorkspaceNumber())->raiseWindow(window);
204 break; 206 break;
205 207
206 case BScreen::WINDOWLOWER: 208 case BScreen::WINDOWLOWER:
207 hide(); 209 hide();
208 screen->getWorkspace(window->getWorkspaceNumber())->lowerWindow(window); 210 screen->getWorkspace(window->getWorkspaceNumber())->lowerWindow(window);
211 if (window->hasTab())
212 window->getTab()->lower(); //lower tabs AND all it's windows
209 break; 213 break;
210 214
211 case BScreen::WINDOWSTICK: 215 case BScreen::WINDOWSTICK:
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 1eea987..11df79c 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.21 2002/01/18 01:23:54 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.22 2002/01/18 18:28:17 pekdon Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -1154,10 +1154,15 @@ void Fluxbox::doWindowAction(Keys::KeyAction action) {
1154 focused_window->iconify(); 1154 focused_window->iconify();
1155 break; 1155 break;
1156 case Keys::RAISE: 1156 case Keys::RAISE:
1157 focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->raiseWindow(focused_window); 1157 if (focused_window->hasTab())
1158 focused_window->getTab()->raise(); //raise the tabs if we have any
1159 focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->raiseWindow(focused_window);
1158 break; 1160 break;
1159 case Keys::LOWER: 1161 case Keys::LOWER:
1160 XLowerWindow(getXDisplay(), focused_window->getFrameWindow()); 1162 focused_window->getScreen()->getWorkspace(focused_window->getWorkspaceNumber())->lowerWindow(focused_window);
1163 if (focused_window->hasTab())
1164 focused_window->getTab()->lower(); //lower the tabs AND it's windows
1165
1161 break; 1166 break;
1162 case Keys::CLOSE: 1167 case Keys::CLOSE:
1163 focused_window->close(); 1168 focused_window->close();