Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97f84ba
)
Convert XGrabKey and Keycode to XCB
author
David Hill
<dhill@conformal.com>
Fri, 13 Jul 2012 18:03:24 +0000
(14:03 -0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 21:58:33 +0000
(
05:58
+0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
fb70aca
..
ce5a1f6
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-5573,7
+5573,7
@@
grabkeys(void)
{
int num_screens;
unsigned int j, k;
{
int num_screens;
unsigned int j, k;
- KeyCode code;
+ xcb_keycode_t *code;
unsigned int modifiers[] =
{ 0, LockMask, numlockmask, numlockmask | LockMask };
struct key *kp;
unsigned int modifiers[] =
{ 0, LockMask, numlockmask, numlockmask | LockMask };
struct key *kp;
@@
-5588,12
+5588,14
@@
grabkeys(void)
xcb_ungrab_key(conn, XCB_GRAB_ANY, screens[k].root,
XCB_MOD_MASK_ANY);
RB_FOREACH(kp, key_tree, &keys) {
xcb_ungrab_key(conn, XCB_GRAB_ANY, screens[k].root,
XCB_MOD_MASK_ANY);
RB_FOREACH(kp, key_tree, &keys) {
- if ((code = XKeysymToKeycode(display, kp->keysym)))
+ if ((code = xcb_key_symbols_get_keycode(syms,
+ kp->keysym)))
for (j = 0; j < LENGTH(modifiers); j++)
for (j = 0; j < LENGTH(modifiers); j++)
- XGrabKey(display, code,
+ xcb_grab_key(conn, True,
+ screens[k].root,
kp->mod | modifiers[j],
kp->mod | modifiers[j],
- screens[k].root, True,
- GrabModeAsync, GrabModeAsync);
+ *code, XCB_GRAB_MODE_ASYNC,
+ XCB_GRAB_MODE_ASYNC);
}
}
}
}
}
}