Introduction
Introduction Statistics Contact Development Disclaimer Help
tgrabbuttons() and grabkeys() are now independent from prior numlockmask initia…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 288cf78b180db846ef2481124f3e7a8fe66c01f2
parent 6411aa921baabd11bfa55eb708bb804dfc6b1375
Author: Anselm R Garbe <[email protected]>
Date: Mon, 25 Aug 2008 09:44:23 +0100
grabbuttons() and grabkeys() are now independent from prior numlockmask initial…
Diffstat:
M dwm.c | 54 ++++++++++++++++++-----------…
1 file changed, 31 insertions(+), 23 deletions(-)
---
diff --git a/dwm.c b/dwm.c
t@@ -191,6 +191,7 @@ static void unmanage(Client *c);
static void unmapnotify(XEvent *e);
static void updatebar(void);
static void updategeom(void);
+static void updatenumlockmask(void);
static void updatesizehints(Client *c);
static void updatetitle(Client *c);
static void updatewmhints(Client *c);
t@@ -735,34 +736,27 @@ gettextprop(Window w, Atom atom, char *text, unsigned in…
void
grabbuttons(Client *c, Bool focused) {
- unsigned int i, j;
- unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|Loc…
-
- XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
- if(focused) {
- for(i = 0; i < LENGTH(buttons); i++)
- if(buttons[i].click == ClkClientWin)
- for(j = 0; j < LENGTH(modifiers); j++)
- XGrabButton(dpy, buttons[i].button, bu…
- } else
- XGrabButton(dpy, AnyButton, AnyModifier, c->win, False,
- BUTTONMASK, GrabModeAsync, GrabModeSync, None, Non…
+ updatenumlockmask();
+ {
+ unsigned int i, j;
+ unsigned int modifiers[] = { 0, LockMask, numlockmask, numlock…
+ XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
+ if(focused) {
+ for(i = 0; i < LENGTH(buttons); i++)
+ if(buttons[i].click == ClkClientWin)
+ for(j = 0; j < LENGTH(modifiers); j++)
+ XGrabButton(dpy, buttons[i].bu…
+ } else
+ XGrabButton(dpy, AnyButton, AnyModifier, c->win, False,
+ BUTTONMASK, GrabModeAsync, GrabModeSync, N…
+ }
}
void
grabkeys(void) {
- unsigned int i, j;
- XModifierKeymap *modmap;
-
- /* update 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);
-
+ updatenumlockmask();
{ /* grab keys */
+ unsigned int i, j;
unsigned int modifiers[] = { 0, LockMask, numlockmask, numlock…
KeyCode code;
t@@ -1576,6 +1570,20 @@ updategeom(void) {
}
void
+updatenumlockmask(void) {
+ unsigned int i, j;
+ XModifierKeymap *modmap;
+
+ numlockmask = 0;
+ 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);
+}
+
+void
updatesizehints(Client *c) {
long msize;
XSizeHints size;
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.