Stop cycling focus when another command gets run, even if modifiers are still down
This commit is contained in:
parent
ecb0d95b8f
commit
2ff67d09a7
3 changed files with 17 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -54,8 +54,7 @@ void NextWindowCmd::execute() {
|
|||
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 @@ void PrevWindowCmd::execute() {
|
|||
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
|
||||
|
|
|
@ -1113,12 +1113,22 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue