aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-09-28 08:26:21 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-09-28 08:26:21 (GMT)
commit04a1d2a83b96eb6d1b1958e4f3e25ffdf295aa4d (patch)
treeefeb502c24025cd090629ae36d330fa882a41403 /src/Keys.cc
parentc8022b3bdb90259352d08838576e98b559a9db68 (diff)
downloadfluxbox-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.cc11
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();