all repos — dwm @ 0f3acce0429bc5d2906eaf9279abc5565b189d33

my dwm build

added mappingnotify event for kb refreshes
Anselm R.Garbe arg@10ksloc.org
Mon, 14 Aug 2006 16:08:52 +0200
commit

0f3acce0429bc5d2906eaf9279abc5565b189d33

parent

9eef9f7b0277a893fb5e22ac109f785faf573580

1 files changed, 12 insertions(+), 0 deletions(-)

jump to
M event.cevent.c

@@ -277,6 +277,16 @@ }

} static void +mappingnotify(XEvent *e) +{ + XMappingEvent *ev = &e->xmapping; + + XRefreshKeyboardMapping(ev); + if(ev->request == MappingKeyboard) + grabkeys(); +} + +static void maprequest(XEvent *e) { static XWindowAttributes wa;

@@ -348,6 +358,7 @@ [EnterNotify] = enternotify,

[LeaveNotify] = leavenotify, [Expose] = expose, [KeyPress] = keypress, + [MappingNotify] = mappingnotify, [MapRequest] = maprequest, [PropertyNotify] = propertynotify, [UnmapNotify] = unmapnotify

@@ -360,6 +371,7 @@ static unsigned int len = sizeof(key) / sizeof(key[0]);

unsigned int i; KeyCode code; + XUngrabKey(dpy, AnyKey, AnyModifier, root); for(i = 0; i < len; i++) { code = XKeysymToKeycode(dpy, key[i].keysym); XGrabKey(dpy, code, key[i].mod, root, True,