commit f226c16effae5e46f7b62209dcc88abfb4b1e1ec
parent 5031e3cccf9d0a8bfa40d0fb5faebfbb23f261ee
Author: Anselm R.Garbe <arg@10ksloc.org>
Date: Mon, 14 Aug 2006 18:41:59 +0200
added mappingnotify event/removed keyboardnotify (now xkbset ans such tools should work fine)
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmd/wm/event.c b/cmd/wm/event.c
@@ -19,7 +19,7 @@ static void enternotify(XEvent *e);
static void leavenotify(XEvent *e);
static void expose(XEvent *e);
static void keypress(XEvent *e);
-static void keymapnotify(XEvent *e);
+static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e);
static void motionnotify(XEvent *e);
static void propertynotify(XEvent *e);
@@ -34,8 +34,8 @@ void (*handler[LASTEvent]) (XEvent *) = {
[LeaveNotify] = leavenotify,
[Expose] = expose,
[KeyPress] = keypress,
- [KeymapNotify] = keymapnotify,
[MotionNotify] = motionnotify,
+ [MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[PropertyNotify]= propertynotify,
[UnmapNotify] = unmapnotify
@@ -277,9 +277,13 @@ keypress(XEvent *e)
}
static void
-keymapnotify(XEvent *e)
+mappingnotify(XEvent *e)
{
- update_keys();
+ XMappingEvent *ev = &e->xmapping;
+
+ XRefreshKeyboardMapping(ev);
+ if(ev->request == MappingKeyboard)
+ update_keys();
}
static void