diff options
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/KeyUtil.cc | 7 | ||||
-rw-r--r-- | src/FbTk/KeyUtil.hh | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/FbTk/KeyUtil.cc b/src/FbTk/KeyUtil.cc index 3f413a9..6985139 100644 --- a/src/FbTk/KeyUtil.cc +++ b/src/FbTk/KeyUtil.cc | |||
@@ -138,7 +138,7 @@ void KeyUtil::grabButton(unsigned int button, unsigned int mod, Window win, | |||
138 | for (int i = 0; i < 8; i++) { | 138 | for (int i = 0; i < 8; i++) { |
139 | XGrabButton(display, button, mod | (i & 1 ? capsmod : 0) | | 139 | XGrabButton(display, button, mod | (i & 1 ? capsmod : 0) | |
140 | (i & 2 ? nummod : 0) | (i & 4 ? scrollmod : 0), | 140 | (i & 2 ? nummod : 0) | (i & 4 ? scrollmod : 0), |
141 | win, True, event_mask, GrabModeAsync, GrabModeAsync, | 141 | win, False, event_mask, GrabModeAsync, GrabModeAsync, |
142 | None, cursor); | 142 | None, cursor); |
143 | } | 143 | } |
144 | 144 | ||
@@ -180,6 +180,11 @@ void KeyUtil::ungrabKeys(Window win) { | |||
180 | XUngrabKey(display, AnyKey, AnyModifier, win); | 180 | XUngrabKey(display, AnyKey, AnyModifier, win); |
181 | } | 181 | } |
182 | 182 | ||
183 | void KeyUtil::ungrabButtons(Window win) { | ||
184 | Display * display = App::instance()->display(); | ||
185 | XUngrabButton(display, AnyButton, AnyModifier, win); | ||
186 | } | ||
187 | |||
183 | unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { | 188 | unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { |
184 | XModifierKeymap *modmap = instance().m_modmap; | 189 | XModifierKeymap *modmap = instance().m_modmap; |
185 | 190 | ||
diff --git a/src/FbTk/KeyUtil.hh b/src/FbTk/KeyUtil.hh index eb2cdd5..4909c5a 100644 --- a/src/FbTk/KeyUtil.hh +++ b/src/FbTk/KeyUtil.hh | |||
@@ -62,6 +62,7 @@ public: | |||
62 | ungrabs all keys | 62 | ungrabs all keys |
63 | */ | 63 | */ |
64 | static void ungrabKeys(Window win); | 64 | static void ungrabKeys(Window win); |
65 | static void ungrabButtons(Window win); | ||
65 | 66 | ||
66 | /** | 67 | /** |
67 | Strip out modifiers we want to ignore | 68 | Strip out modifiers we want to ignore |