aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/KeyUtil.cc2
-rw-r--r--src/Screen.cc5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc
index 10bc118..46a712a 100644
--- a/src/FbTk/KeyUtil.cc
+++ b/src/FbTk/KeyUtil.cc
@@ -129,7 +129,7 @@ void KeyUtil::grabKey(unsigned int key, unsigned int mod, Window win) {
129 for (int i = 0; i < 8; i++) { 129 for (int i = 0; i < 8; i++) {
130 XGrabKey(display, key, mod | (i & 1 ? LockMask : 0) | 130 XGrabKey(display, key, mod | (i & 1 ? LockMask : 0) |
131 (i & 2 ? nummod : 0) | (i & 4 ? scrollmod : 0), 131 (i & 2 ? nummod : 0) | (i & 4 ? scrollmod : 0),
132 win, True, GrabModeAsync, GrabModeAsync); 132 win, True, GrabModeAsync, GrabModeSync);
133 } 133 }
134 134
135} 135}
diff --git a/src/Screen.cc b/src/Screen.cc
index 013b6c6..277952b 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -658,11 +658,14 @@ void BScreen::propertyNotify(Atom atom) {
658 658
659void BScreen::keyPressEvent(XKeyEvent &ke) { 659void BScreen::keyPressEvent(XKeyEvent &ke) {
660 if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, 660 if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode,
661 Keys::GLOBAL|Keys::ON_DESKTOP)) { 661 Keys::GLOBAL|(ke.subwindow ? 0 : Keys::ON_DESKTOP))) {
662 662
663 // re-grab keyboard, so we don't pass KeyRelease to clients 663 // re-grab keyboard, so we don't pass KeyRelease to clients
664 // also for catching invalid keys in the middle of keychains 664 // also for catching invalid keys in the middle of keychains
665 FbTk::EventManager::instance()->grabKeyboard(rootWindow().window()); 665 FbTk::EventManager::instance()->grabKeyboard(rootWindow().window());
666 XAllowEvents(Fluxbox::instance()->display(), SyncKeyboard, CurrentTime);
667 } else {
668 XAllowEvents(Fluxbox::instance()->display(), ReplayKeyboard, CurrentTime);
666 } 669 }
667} 670}
668 671