diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-28 08:26:21 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-09-28 08:26:21 (GMT) |
commit | 04a1d2a83b96eb6d1b1958e4f3e25ffdf295aa4d (patch) | |
tree | efeb502c24025cd090629ae36d330fa882a41403 /src/Keys.cc | |
parent | c8022b3bdb90259352d08838576e98b559a9db68 (diff) | |
download | fluxbox-04a1d2a83b96eb6d1b1958e4f3e25ffdf295aa4d.zip fluxbox-04a1d2a83b96eb6d1b1958e4f3e25ffdf295aa4d.tar.bz2 |
don't let KeyRelease events propagate to windows
Diffstat (limited to 'src/Keys.cc')
-rw-r--r-- | src/Keys.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Keys.cc b/src/Keys.cc index b917989..05f1747 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -510,12 +510,6 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key, | |||
510 | // grab "None Escape" to exit keychain in the middle | 510 | // grab "None Escape" to exit keychain in the middle |
511 | unsigned int esc = FbTk::KeyUtil::getKey("Escape"); | 511 | unsigned int esc = FbTk::KeyUtil::getKey("Escape"); |
512 | 512 | ||
513 | // if focus changes, windows will get NotifyWhileGrabbed, | ||
514 | // which they tend to ignore | ||
515 | if (temp_key && type == KeyPress && | ||
516 | !FbTk::EventManager::instance()->grabbingKeyboard()) | ||
517 | XUngrabKeyboard(Fluxbox::instance()->display(), CurrentTime); | ||
518 | |||
519 | if (temp_key && !temp_key->keylist.empty()) { // emacs-style | 513 | if (temp_key && !temp_key->keylist.empty()) { // emacs-style |
520 | if (!saved_keymode) | 514 | if (!saved_keymode) |
521 | saved_keymode = m_keylist; | 515 | saved_keymode = m_keylist; |
@@ -536,6 +530,11 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key, | |||
536 | return false; | 530 | return false; |
537 | } | 531 | } |
538 | 532 | ||
533 | // if focus changes, windows will get NotifyWhileGrabbed, | ||
534 | // which they tend to ignore | ||
535 | if (type == KeyPress) | ||
536 | XUngrabKeyboard(Fluxbox::instance()->display(), CurrentTime); | ||
537 | |||
539 | WinClient *old = WindowCmd<void>::client(); | 538 | WinClient *old = WindowCmd<void>::client(); |
540 | WindowCmd<void>::setClient(current); | 539 | WindowCmd<void>::setClient(current); |
541 | temp_key->m_command->execute(); | 540 | temp_key->m_command->execute(); |