Fix lost keypresses after workspace change (#1067) Do not Ungrab the keyboard for a KeyPress event, this causes us to lose the KeyRelease event which is needed to ungrab the keyboard after the event happened.
Ed Martin edman007@edman007.com
2 files changed,
2 insertions(+),
11 deletions(-)
M
src/Keys.cc
→
src/Keys.cc
@@ -581,11 +581,6 @@ }
return false; } - // if focus changes, windows will get NotifyWhileGrabbed, - // which they tend to ignore - if (type == KeyPress) - XUngrabKeyboard(Fluxbox::instance()->display(), CurrentTime); - WinClient *old = WindowCmd<void>::client(); WindowCmd<void>::setClient(current); temp_key->m_command->execute();
M
src/Screen.cc
→
src/Screen.cc
@@ -812,12 +812,8 @@ m_bg_change_sig.emit(*this);
} void BScreen::keyPressEvent(XKeyEvent &ke) { - if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, - Keys::GLOBAL|Keys::ON_DESKTOP)) - // re-grab keyboard, so we don't pass KeyRelease to clients - // also for catching invalid keys in the middle of keychains - FbTk::EventManager::instance()->grabKeyboard(rootWindow().window()); - + Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, + Keys::GLOBAL|Keys::ON_DESKTOP); } void BScreen::keyReleaseEvent(XKeyEvent &ke) {