Introduction
Introduction Statistics Contact Development Disclaimer Help
tapplied Peter Hartlich's initmodmap patch - dwm - [fork] customized build of d…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 2b4157eccd649682c200de837193dd0a24129dc7
parent 0f26de991f742d548e024a2dadcbfa3a7db8d4b2
Author: Anselm R Garbe <[email protected]>
Date: Sat, 23 Aug 2008 09:26:11 +0100
applied Peter Hartlich's initmodmap patch
Diffstat:
M LICENSE | 1 +
M dwm.c | 31 ++++++++++++++++++-----------…
2 files changed, 19 insertions(+), 13 deletions(-)
---
diff --git a/LICENSE b/LICENSE
t@@ -7,6 +7,7 @@ MIT/X Consortium License
© 2007 Szabolcs Nagy <nszabolcs at gmail dot com>
© 2007 Christof Musik <christof at sendfax dot de>
© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
+© 2007-2008 Peter Hartlich <sgkkr at hartlich dot com>
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
Permission is hereby granted, free of charge, to any person obtaining a
diff --git a/dwm.c b/dwm.c
t@@ -158,6 +158,7 @@ static Bool gettextprop(Window w, Atom atom, char *text, u…
static void grabbuttons(Client *c, Bool focused);
static void grabkeys(void);
static void initfont(const char *fontstr);
+static void initmodmap(void);
static Bool isprotodel(Client *c);
static void keypress(XEvent *e);
static void killclient(const Arg *arg);
t@@ -753,16 +754,6 @@ grabkeys(void) {
unsigned int i, j;
unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|Loc…
KeyCode code;
- XModifierKeymap *modmap;
-
- /* init modifier map */
- modmap = XGetModifierMapping(dpy);
- for(i = 0; i < 8; i++)
- for(j = 0; j < modmap->max_keypermod; j++) {
- if(modmap->modifiermap[i * modmap->max_keypermod + j] …
- numlockmask = (1 << i);
- }
- XFreeModifiermap(modmap);
XUngrabKey(dpy, AnyKey, AnyModifier, root);
for(i = 0; i < LENGTH(keys); i++) {
t@@ -813,6 +804,19 @@ initfont(const char *fontstr) {
dc.font.height = dc.font.ascent + dc.font.descent;
}
+void
+initmodmap(void) {
+ unsigned int i, j;
+ XModifierKeymap *modmap;
+
+ modmap = XGetModifierMapping(dpy);
+ for(i = 0; i < 8; i++)
+ for(j = 0; j < modmap->max_keypermod; j++)
+ if(modmap->modifiermap[i * modmap->max_keypermod + j] …
+ numlockmask = (1 << i);
+ XFreeModifiermap(modmap);
+}
+
Bool
isprotodel(Client *c) {
int i, n;
t@@ -925,8 +929,10 @@ mappingnotify(XEvent *e) {
XMappingEvent *ev = &e->xmapping;
XRefreshKeyboardMapping(ev);
- if(ev->request == MappingKeyboard)
+ if(ev->request == MappingKeyboard) {
+ initmodmap();
grabkeys();
+ }
}
void
t@@ -1373,8 +1379,7 @@ setup(void) {
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);
-
- /* grab keys */
+ initmodmap();
grabkeys();
}
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.