Introduction
Introduction Statistics Contact Development Disclaimer Help
tadded mappingnotify event for kb refreshes - dwm - [fork] customized build of …
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 0f3acce0429bc5d2906eaf9279abc5565b189d33
parent 9eef9f7b0277a893fb5e22ac109f785faf573580
Author: Anselm R.Garbe <[email protected]>
Date: Mon, 14 Aug 2006 16:08:52 +0200
added mappingnotify event for kb refreshes
Diffstat:
M event.c | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/event.c b/event.c
t@@ -277,6 +277,16 @@ leavenotify(XEvent *e)
}
static void
+mappingnotify(XEvent *e)
+{
+ XMappingEvent *ev = &e->xmapping;
+
+ XRefreshKeyboardMapping(ev);
+ if(ev->request == MappingKeyboard)
+ grabkeys();
+}
+
+static void
maprequest(XEvent *e)
{
static XWindowAttributes wa;
t@@ -348,6 +358,7 @@ void (*handler[LASTEvent]) (XEvent *) = {
[LeaveNotify] = leavenotify,
[Expose] = expose,
[KeyPress] = keypress,
+ [MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[PropertyNotify] = propertynotify,
[UnmapNotify] = unmapnotify
t@@ -360,6 +371,7 @@ grabkeys()
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,
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.