aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/KeyUtil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/KeyUtil.cc')
-rw-r--r--src/FbTk/KeyUtil.cc7
1 files changed, 6 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
183void KeyUtil::ungrabButtons(Window win) {
184 Display * display = App::instance()->display();
185 XUngrabButton(display, AnyButton, AnyModifier, win);
186}
187
183unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) { 188unsigned int KeyUtil::keycodeToModmask(unsigned int keycode) {
184 XModifierKeymap *modmap = instance().m_modmap; 189 XModifierKeymap *modmap = instance().m_modmap;
185 190