aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Keys.cc6
-rw-r--r--src/Screen.cc9
2 files changed, 13 insertions, 2 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index 172d913..31f1722 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -575,6 +575,12 @@ bool Keys::doAction(int type, unsigned int mods, unsigned int key,
575 return false; 575 return false;
576 } 576 }
577 577
578 // if focus changes, windows will get NotifyWhileGrabbed,
579 // which they tend to ignore
580 if (type == KeyPress) {
581 XUngrabKeyboard(Fluxbox::instance()->display(), CurrentTime);
582 }
583
578 WinClient *old = WindowCmd<void>::client(); 584 WinClient *old = WindowCmd<void>::client();
579 WindowCmd<void>::setClient(current); 585 WindowCmd<void>::setClient(current);
580 temp_key->m_command->execute(); 586 temp_key->m_command->execute();
diff --git a/src/Screen.cc b/src/Screen.cc
index 9c0182b..1d81191 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -680,8 +680,13 @@ void BScreen::propertyNotify(Atom atom) {
680} 680}
681 681
682void BScreen::keyPressEvent(XKeyEvent &ke) { 682void BScreen::keyPressEvent(XKeyEvent &ke) {
683 Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, 683 if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode,
684 Keys::GLOBAL|Keys::ON_DESKTOP); 684 Keys::GLOBAL|Keys::ON_DESKTOP)) {
685
686 // re-grab keyboard, so we don't pass KeyRelease to clients
687 // also for catching invalid keys in the middle of keychains
688 FbTk::EventManager::instance()->grabKeyboard(rootWindow().window());
689 }
685} 690}
686 691
687void BScreen::keyReleaseEvent(XKeyEvent &ke) { 692void BScreen::keyReleaseEvent(XKeyEvent &ke) {