all repos — fluxbox @ 2ff67d09a733e8e986e8f212bb02dd3d5fef40ee

custom fork of the fluxbox windowmanager

Stop cycling focus when another command gets run, even if modifiers are still down
markt markt
commit

2ff67d09a733e8e986e8f212bb02dd3d5fef40ee

parent

ecb0d95b8fdb98137236dfb17fdf0ebe384b6c29

3 files changed, 17 insertions(+), 6 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0rc3: +*06/12/17: + * Stop cycling focus when any other command is run, e.g. bug #1595336 (Mark) + fluxbox.cc WorkspaceCmd.cc *06/12/16: * Remove useless stuff from code that reloads configuration (Mark) fluxbox.cc
M src/WorkspaceCmd.ccsrc/WorkspaceCmd.cc

@@ -54,8 +54,7 @@ screen->focusControl().nextFocus(m_option | FocusControl::CYCLELINEAR);

else { // if stacked cycling, then set a watch for // the release of exactly these modifiers - if (screen != fb->watchingScreen()) - Fluxbox::instance()->watchKeyRelease(*screen, mods); + Fluxbox::instance()->watchKeyRelease(*screen, mods); screen->focusControl().nextFocus(m_option); } } else

@@ -76,8 +75,7 @@ screen->focusControl().prevFocus(m_option | FocusControl::CYCLELINEAR);

else { // if stacked cycling, then set a watch for // the release of exactly these modifiers - if (screen != fb->watchingScreen()) - Fluxbox::instance()->watchKeyRelease(*screen, mods); + Fluxbox::instance()->watchKeyRelease(*screen, mods); screen->focusControl().prevFocus(m_option); } } else
M src/fluxbox.ccsrc/fluxbox.cc

@@ -1113,12 +1113,22 @@

if (keyScreen() == 0 || mouseScreen() == 0) return; + BScreen *old_watching_screen = m_watching_screen; + switch (ke.type) { case KeyPress: - if (m_key->doAction(ke)) + // see if we need to keep watching for key releases + m_watching_screen = 0; + if (m_key->doAction(ke)) { XAllowEvents(FbTk::App::instance()->display(), AsyncKeyboard, CurrentTime); - else + // if we've done some action other than cycling focus + if (old_watching_screen && m_watching_screen != old_watching_screen) + old_watching_screen->notifyReleasedKeys(ke); + } else { XAllowEvents(FbTk::App::instance()->display(), ReplayKeyboard, CurrentTime); + // could still be cycling + m_watching_screen = old_watching_screen; + } break; case KeyRelease: { // we ignore most key releases unless we need to use