delay mouse driven tab focus by autoraise interval
REQUEST: 190
This commit is contained in:
parent
3254816b6b
commit
14e25f4a65
2 changed files with 10 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "Window.hh"
|
||||
|
||||
#include "CurrentWindowCmd.hh"
|
||||
#include "WinClient.hh"
|
||||
#include "fluxbox.hh"
|
||||
#include "Keys.hh"
|
||||
|
@ -360,6 +361,7 @@ FluxboxWindow::~FluxboxWindow() {
|
|||
m_labelbuttons.clear();
|
||||
|
||||
m_timer.stop();
|
||||
m_tabActivationTimer.stop();
|
||||
|
||||
// notify die
|
||||
dieSig().emit(*this);
|
||||
|
@ -441,6 +443,11 @@ void FluxboxWindow::init() {
|
|||
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 @@ void FluxboxWindow::reconfigure() {
|
|||
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 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) {
|
|||
if (screen().focusControl().isMouseTabFocus() &&
|
||||
client && client != m_client &&
|
||||
!screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) {
|
||||
setCurrentClient(*client, isFocused());
|
||||
m_tabActivationTimer.start();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -552,6 +552,7 @@ private:
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue