aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.cc
diff options
context:
space:
mode:
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();