From def26c19e5b787916104c03f5540e5b3a44004eb Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 23 Jul 2006 01:41:37 +0000 Subject: fix restacking while cycling --- src/FocusControl.cc | 16 ++++++++-------- src/Window.cc | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/FocusControl.cc b/src/FocusControl.cc index c4c441e..03f1dc5 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc @@ -91,13 +91,9 @@ void FocusControl::cycleFocus(int opts, bool cycle_reverse) { m_cycling_creation_order = (opts & CYCLELINEAR); m_was_iconic = false; m_cycling_last = 0; - } else { - // already cycling, so restack to put windows back in their proper order - m_screen.layerManager().restack(); - if (m_cycling_creation_order ^ (bool)(opts & CYCLELINEAR)) { - m_cycling_creation_order ^= true; - m_cycling_window = find(window_list->begin(),window_list->end(),*m_cycling_window); - } + } else if (m_cycling_creation_order ^ (bool)(opts & CYCLELINEAR)) { + m_cycling_creation_order ^= true; + m_cycling_window = find(window_list->begin(),window_list->end(),*m_cycling_window); } // if it is stacked, we want the highest window in the focused list // that is on the same workspace @@ -130,6 +126,10 @@ void FocusControl::cycleFocus(int opts, bool cycle_reverse) { // moved onto a new fbwin if (!m_cycling_last || m_cycling_last->fbwindow() != fbwin) { if (m_cycling_last) { + // already cycling, so restack to put windows back in + // their proper order + m_screen.layerManager().restack(); + // set back to orig current Client in that fbwin m_cycling_last->fbwindow()->setCurrentClient(*m_cycling_last, false); } @@ -137,8 +137,8 @@ void FocusControl::cycleFocus(int opts, bool cycle_reverse) { if (m_was_iconic) (*m_cycling_window)->fbwindow()->iconify(); m_was_iconic = fbwin->isIconic(); + fbwin->tempRaise(); } - fbwin->tempRaise(); break; } } diff --git a/src/Window.cc b/src/Window.cc index aa9a2b7..265d948 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -2101,7 +2101,7 @@ void FluxboxWindow::setFocusFlag(bool focus) { if (focus != frame().focused()) frame().setFocus(focus); - if (screen().doAutoRaise()) { + if (screen().doAutoRaise() && !screen().focusControl().isCycling()) { if (focused) m_timer.start(); else -- cgit v0.11.2