aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2007-01-14 19:02:01 (GMT)
committermarkt <markt>2007-01-14 19:02:01 (GMT)
commitfc502861a45704a8f7cd21282cbccd7e5ac620f3 (patch)
treee23f6a03244fcffb9bd651197bd5d64f7a6c641d /src
parent6ed9f38b7a6cb4ac85522b9f9c2074342ddffd3f (diff)
downloadfluxbox-fc502861a45704a8f7cd21282cbccd7e5ac620f3.zip
fluxbox-fc502861a45704a8f7cd21282cbccd7e5ac620f3.tar.bz2
make sure we ungrab the keyboard when changing the alt-tab screen,
or else we'll lose an entire keystroke!\
Diffstat (limited to 'src')
-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);