aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index e492fb5..89b37fe 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1129,8 +1129,11 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1129 if (!m_key->doAction(ke)) // could still be cycling 1129 if (!m_key->doAction(ke)) // could still be cycling
1130 m_watching_screen = old_watching_screen; 1130 m_watching_screen = old_watching_screen;
1131 else if (old_watching_screen && 1131 else if (old_watching_screen &&
1132 m_watching_screen != old_watching_screen) 1132 m_watching_screen != old_watching_screen) {
1133 old_watching_screen->notifyReleasedKeys(ke); 1133 old_watching_screen->notifyReleasedKeys(ke);
1134 if (!m_watching_screen)
1135 XUngrabKeyboard(FbTk::App::instance()->display(), CurrentTime);
1136 }
1134 break; 1137 break;
1135 case KeyRelease: { 1138 case KeyRelease: {
1136 // we ignore most key releases unless we need to use 1139 // we ignore most key releases unless we need to use
@@ -1852,6 +1855,8 @@ void Fluxbox::watchKeyRelease(BScreen &screen, unsigned int mods) {
1852 1855
1853 // just make sure we are saving the mods with any other flags (xkb) 1856 // just make sure we are saving the mods with any other flags (xkb)
1854 m_watch_keyrelease = FbTk::KeyUtil::instance().isolateModifierMask(mods); 1857 m_watch_keyrelease = FbTk::KeyUtil::instance().isolateModifierMask(mods);
1858 // TODO: it's possible (and happens to me sometimes) for the mods to be
1859 // released before we grab the keyboard -- not sure of a good way to fix it
1855 XGrabKeyboard(FbTk::App::instance()->display(), 1860 XGrabKeyboard(FbTk::App::instance()->display(),
1856 screen.rootWindow().window(), True, 1861 screen.rootWindow().window(), True,
1857 GrabModeAsync, GrabModeAsync, CurrentTime); 1862 GrabModeAsync, GrabModeAsync, CurrentTime);