aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authormarkt <markt>2007-02-09 18:13:01 (GMT)
committermarkt <markt>2007-02-09 18:13:01 (GMT)
commit6fdda1a31d2417c23f5f222114d30ce6abec8b40 (patch)
tree929a0c0a5ffac232568011ef055934354f4367da /src/FbTk
parent93d8310c0c51fe1edcdfa5240f724ab6306ce92a (diff)
downloadfluxbox-6fdda1a31d2417c23f5f222114d30ce6abec8b40.zip
fluxbox-6fdda1a31d2417c23f5f222114d30ce6abec8b40.tar.bz2
added mouse bindings to the keys file
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/KeyUtil.cc7
-rw-r--r--src/FbTk/KeyUtil.hh1
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
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
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