all repos — fluxbox @ 58e09b719077605efadac9b712acb8f5e752f732

custom fork of the fluxbox windowmanager

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
commit

58e09b719077605efadac9b712acb8f5e752f732

parent

3ad6e299f6156d97b91de30f374c2bbdad433f42

2 files changed, 2 insertions(+), 11 deletions(-)

jump to
M src/Keys.ccsrc/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.ccsrc/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) {