aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-01-26 17:21:44 (GMT)
committermarkt <markt>2007-01-26 17:21:44 (GMT)
commite35670d4a6a1ace394ff13cae39e41c2171b9054 (patch)
tree528bfabe69f61f2e664bb111661b90d2de9e8b94
parent46fff8bf344b31c2b4e0f777312bfad22a6fcd26 (diff)
downloadfluxbox-e35670d4a6a1ace394ff13cae39e41c2171b9054.zip
fluxbox-e35670d4a6a1ace394ff13cae39e41c2171b9054.tar.bz2
opening window on different workspace should put it at front of focused list with focusnew
-rw-r--r--ChangeLog5
-rw-r--r--src/FocusControl.cc10
-rw-r--r--src/FocusControl.hh1
-rw-r--r--src/Screen.cc8
4 files changed, 19 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c9ea69..256b72d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/01/26:
4 * Opening a window on a different workspace with Focus New Windows enabled
5 should focus the window when you get to that workspace -- as a free bonus,
6 stacking order should be more stable on fluxbox restart (Mark)
7 Screen.cc FocusControl.cc/hh
3*07/01/25: 8*07/01/25:
4 * Don't raise any windows above OverrideRedirect windows, otherwise they 9 * Don't raise any windows above OverrideRedirect windows, otherwise they
5 eventually get pushed to the bottomm, bug #1447583 (Mark) 10 eventually get pushed to the bottomm, bug #1447583 (Mark)
diff --git a/src/FocusControl.cc b/src/FocusControl.cc
index 61d6e87..21c243d 100644
--- a/src/FocusControl.cc
+++ b/src/FocusControl.cc
@@ -149,6 +149,11 @@ void FocusControl::addFocusBack(WinClient &client) {
149 m_creation_order_list.push_back(&client); 149 m_creation_order_list.push_back(&client);
150} 150}
151 151
152void FocusControl::addFocusFront(WinClient &client) {
153 m_focused_list.push_front(&client);
154 m_creation_order_list.push_back(&client);
155}
156
152// move all clients in given window to back of focused list 157// move all clients in given window to back of focused list
153void FocusControl::setFocusBack(FluxboxWindow *fbwin) { 158void FocusControl::setFocusBack(FluxboxWindow *fbwin) {
154 // do nothing if there are no windows open 159 // do nothing if there are no windows open
@@ -375,8 +380,9 @@ void FocusControl::removeClient(WinClient &client) {
375} 380}
376 381
377void FocusControl::shutdown() { 382void FocusControl::shutdown() {
378 FocusedWindows::iterator it = m_focused_list.begin(); 383 // restore windows backwards so they get put back correctly on restart
379 for (; it != m_focused_list.end(); ++it) { 384 FocusedWindows::reverse_iterator it = m_focused_list.rbegin();
385 for (; it != m_focused_list.rend(); ++it) {
380 if (*it && (*it)->fbwindow()) 386 if (*it && (*it)->fbwindow())
381 (*it)->fbwindow()->restore(*it, true); 387 (*it)->fbwindow()->restore(*it, true);
382 } 388 }
diff --git a/src/FocusControl.hh b/src/FocusControl.hh
index d38ede0..ee5fe95 100644
--- a/src/FocusControl.hh
+++ b/src/FocusControl.hh
@@ -85,6 +85,7 @@ public:
85 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; } 85 bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; }
86 bool isCycling() const { return m_cycling_focus; } 86 bool isCycling() const { return m_cycling_focus; }
87 void addFocusBack(WinClient &client); 87 void addFocusBack(WinClient &client);
88 void addFocusFront(WinClient &client);
88 void setFocusBack(FluxboxWindow *fbwin); 89 void setFocusBack(FluxboxWindow *fbwin);
89 90
90 FocusModel focusModel() const { return *m_focus_model; } 91 FocusModel focusModel() const { return *m_focus_model; }
diff --git a/src/Screen.cc b/src/Screen.cc
index 30cc4d3..7c0bed9 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1403,9 +1403,11 @@ FluxboxWindow *BScreen::createWindow(Window client) {
1403 } 1403 }
1404 } 1404 }
1405 1405
1406 // always put on end of focused list, if it gets focused it'll get pushed up 1406 // add the window to the focus list
1407 // there is only the one win client at this stage 1407 if (focusControl().focusNew())
1408 focusControl().addFocusBack(*winclient); 1408 focusControl().addFocusFront(*winclient);
1409 else
1410 focusControl().addFocusBack(*winclient);
1409 1411
1410 // we also need to check if another window expects this window to the left 1412 // we also need to check if another window expects this window to the left
1411 // and if so, then join it. 1413 // and if so, then join it.