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:
157c555
)
Fix segfault when X keyboard map does not include Num_Lock.
author
Reginald Kennedy
<rk@rejii.com>
Fri, 8 Nov 2013 20:15:52 +0000
(
04:15
+0800)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 8 Nov 2013 21:49:13 +0000
(
05:49
+0800)
Fixes #21
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
113452f
..
00972db
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-6818,9
+6818,11
@@
updatenumlockmask(void)
+ j];
keycode = xcb_key_symbols_get_keycode(syms,
XK_Num_Lock);
+ j];
keycode = xcb_key_symbols_get_keycode(syms,
XK_Num_Lock);
- if (kc == *keycode)
- numlockmask = (1 << i);
- free(keycode);
+ if (keycode) {
+ if (kc == *keycode)
+ numlockmask = (1 << i);
+ free(keycode);
+ }
}
}
free(modmap_r);
}
}
free(modmap_r);
@@
-8771,10
+8773,22
@@
mapnotify(xcb_map_notify_event_t *e)
void
mappingnotify(xcb_mapping_notify_event_t *e)
{
void
mappingnotify(xcb_mapping_notify_event_t *e)
{
+ struct ws_win *w;
+ int i, j, num_screens;
+
xcb_refresh_keyboard_mapping(syms, e);
xcb_refresh_keyboard_mapping(syms, e);
- if (e->request == XCB_MAPPING_KEYBOARD)
+ if (e->request == XCB_MAPPING_KEYBOARD) {
grabkeys();
grabkeys();
+
+ /* Regrab buttons on all managed windows. */
+ num_screens = get_screen_count();
+ for (i = 0; i < num_screens; i++)
+ for (j = 0; j < workspace_limit; j++)
+ TAILQ_FOREACH(w, &screens[i].ws[j].winlist,
+ entry)
+ grabbuttons(w);
+ }
}
void
}
void