aboutsummaryrefslogtreecommitdiff
path: root/src/FocusControl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FocusControl.cc')
-rw-r--r--src/FocusControl.cc10
1 files changed, 8 insertions, 2 deletions
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 }