all repos — fluxbox @ 14e25f4a658f19389921fcfc6d7e355041146af1

custom fork of the fluxbox windowmanager

delay mouse driven tab focus by autoraise interval

REQUEST: 190
Thomas Lübking thomas.luebking@gmail.com
commit

14e25f4a658f19389921fcfc6d7e355041146af1

parent

3254816b6b0bbcf0e5b85ea8eb836ce9bac96bbb

2 files changed, 10 insertions(+), 1 deletions(-)

jump to
M src/Window.ccsrc/Window.cc

@@ -24,6 +24,7 @@ // DEALINGS IN THE SOFTWARE.

#include "Window.hh" +#include "CurrentWindowCmd.hh" #include "WinClient.hh" #include "fluxbox.hh" #include "Keys.hh"

@@ -360,6 +361,7 @@

m_labelbuttons.clear(); m_timer.stop(); + m_tabActivationTimer.stop(); // notify die dieSig().emit(*this);

@@ -440,6 +442,11 @@ FbTk::RefCount<FbTk::Command<void> > raise_cmd(new FbTk::SimpleCommand<FluxboxWindow>(*this,

&FluxboxWindow::raise)); m_timer.setCommand(raise_cmd); m_timer.fireOnce(true); + + m_tabActivationTimer.setTimeout(fluxbox.getAutoRaiseDelay() * FbTk::FbTime::IN_MILLISECONDS); + FbTk::RefCount<ActivateTabCmd> activate_tab_cmd(new ActivateTabCmd()); + m_tabActivationTimer.setCommand(activate_tab_cmd); + m_tabActivationTimer.fireOnce(true); /**************************************************/ /* Read state above here, apply state below here. */

@@ -1127,6 +1134,7 @@ applyDecorations();

setFocusFlag(m_focused); moveResize(frame().x(), frame().y(), frame().width(), frame().height()); m_timer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay() * FbTk::FbTime::IN_MILLISECONDS); + m_tabActivationTimer.setTimeout(Fluxbox::instance()->getAutoRaiseDelay() * FbTk::FbTime::IN_MILLISECONDS); updateButtons(); frame().reconfigure(); menu().reconfigure();

@@ -2799,7 +2807,7 @@

if (screen().focusControl().isMouseTabFocus() && client && client != m_client && !screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) { - setCurrentClient(*client, isFocused()); + m_tabActivationTimer.start(); } }
M src/Window.hhsrc/Window.hh

@@ -552,6 +552,7 @@

uint64_t m_creation_time; uint64_t m_last_keypress_time; FbTk::Timer m_timer; + FbTk::Timer m_tabActivationTimer; // Window states bool moving, resizing, m_initialized;