diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-10-04 05:59:14 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-10-04 05:59:14 (GMT) |
commit | 22f3df9aa81efc071cb13d43a372ead97548eebc (patch) | |
tree | 7aebd6ceca68ab4b7a723ac4d2370239c59afde1 /src/Screen.cc | |
parent | c91926cf71dcaaea2cf6e56e74b1de50ff17f6f5 (diff) | |
download | fluxbox-22f3df9aa81efc071cb13d43a372ead97548eebc.zip fluxbox-22f3df9aa81efc071cb13d43a372ead97548eebc.tar.bz2 |
break keychains after an invalid key is pressed (which unfortunately will be swallowed)
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 892afda..49b631d 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -856,6 +856,7 @@ void BScreen::keyPressEvent(XKeyEvent &ke) { | |||
856 | if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, | 856 | if (Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode, |
857 | Keys::GLOBAL|Keys::ON_DESKTOP)) | 857 | Keys::GLOBAL|Keys::ON_DESKTOP)) |
858 | // re-grab keyboard, so we don't pass KeyRelease to clients | 858 | // re-grab keyboard, so we don't pass KeyRelease to clients |
859 | // also for catching invalid keys in the middle of keychains | ||
859 | FbTk::EventManager::instance()->grabKeyboard(rootWindow().window()); | 860 | FbTk::EventManager::instance()->grabKeyboard(rootWindow().window()); |
860 | 861 | ||
861 | } | 862 | } |
@@ -871,8 +872,8 @@ void BScreen::keyReleaseEvent(XKeyEvent &ke) { | |||
871 | m_cycling = false; | 872 | m_cycling = false; |
872 | focusControl().stopCyclingFocus(); | 873 | focusControl().stopCyclingFocus(); |
873 | } | 874 | } |
874 | 875 | if (!Fluxbox::instance()->keys()->inKeychain()) | |
875 | FbTk::EventManager::instance()->ungrabKeyboard(); | 876 | FbTk::EventManager::instance()->ungrabKeyboard(); |
876 | } | 877 | } |
877 | 878 | ||
878 | void BScreen::buttonPressEvent(XButtonEvent &be) { | 879 | void BScreen::buttonPressEvent(XButtonEvent &be) { |