diff options
author | markt <markt> | 2006-12-17 22:21:23 (GMT) |
---|---|---|
committer | markt <markt> | 2006-12-17 22:21:23 (GMT) |
commit | 2ff67d09a733e8e986e8f212bb02dd3d5fef40ee (patch) | |
tree | 973e525439783f087a61410756757d045afcad3f /src/fluxbox.cc | |
parent | ecb0d95b8fdb98137236dfb17fdf0ebe384b6c29 (diff) | |
download | fluxbox_pavel-2ff67d09a733e8e986e8f212bb02dd3d5fef40ee.zip fluxbox_pavel-2ff67d09a733e8e986e8f212bb02dd3d5fef40ee.tar.bz2 |
Stop cycling focus when another command gets run, even if modifiers are still down
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r-- | src/fluxbox.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index fdc5d37..8a810a4 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -1113,12 +1113,22 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { | |||
1113 | if (keyScreen() == 0 || mouseScreen() == 0) | 1113 | if (keyScreen() == 0 || mouseScreen() == 0) |
1114 | return; | 1114 | return; |
1115 | 1115 | ||
1116 | BScreen *old_watching_screen = m_watching_screen; | ||
1117 | |||
1116 | switch (ke.type) { | 1118 | switch (ke.type) { |
1117 | case KeyPress: | 1119 | case KeyPress: |
1118 | if (m_key->doAction(ke)) | 1120 | // see if we need to keep watching for key releases |
1121 | m_watching_screen = 0; | ||
1122 | if (m_key->doAction(ke)) { | ||
1119 | XAllowEvents(FbTk::App::instance()->display(), AsyncKeyboard, CurrentTime); | 1123 | XAllowEvents(FbTk::App::instance()->display(), AsyncKeyboard, CurrentTime); |
1120 | else | 1124 | // if we've done some action other than cycling focus |
1125 | if (old_watching_screen && m_watching_screen != old_watching_screen) | ||
1126 | old_watching_screen->notifyReleasedKeys(ke); | ||
1127 | } else { | ||
1121 | XAllowEvents(FbTk::App::instance()->display(), ReplayKeyboard, CurrentTime); | 1128 | XAllowEvents(FbTk::App::instance()->display(), ReplayKeyboard, CurrentTime); |
1129 | // could still be cycling | ||
1130 | m_watching_screen = old_watching_screen; | ||
1131 | } | ||
1122 | break; | 1132 | break; |
1123 | case KeyRelease: { | 1133 | case KeyRelease: { |
1124 | // we ignore most key releases unless we need to use | 1134 | // we ignore most key releases unless we need to use |