|
|
@ -723,17 +723,16 @@ gettextprop(Window w, Atom atom, char *text, uint size) { |
|
|
|
|
|
|
|
|
|
|
|
void |
|
|
|
void |
|
|
|
grabbuttons(Client *c, Bool focused) { |
|
|
|
grabbuttons(Client *c, Bool focused) { |
|
|
|
int i, j; |
|
|
|
uint i, j; |
|
|
|
uint buttons[] = { Button1, Button2, Button3 }; |
|
|
|
uint modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; |
|
|
|
uint modifiers[] = { MODKEY, MODKEY|LockMask, MODKEY|numlockmask, MODKEY|numlockmask|LockMask }; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
|
|
|
XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
|
|
|
if(focused) |
|
|
|
if(focused) { |
|
|
|
for(i = 0; i < LENGTH(buttons); i++) |
|
|
|
for(i = 0; i < LENGTH(buttons); i++) |
|
|
|
|
|
|
|
if(buttons[i].click == ClkClientWin) |
|
|
|
for(j = 0; j < LENGTH(modifiers); j++) |
|
|
|
for(j = 0; j < LENGTH(modifiers); j++) |
|
|
|
XGrabButton(dpy, buttons[i], modifiers[j], c->win, False, |
|
|
|
XGrabButton(dpy, buttons[i].button, buttons[i].mask | modifiers[j], c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); |
|
|
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); |
|
|
|
} else |
|
|
|
else |
|
|
|
|
|
|
|
XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, |
|
|
|
XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, |
|
|
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); |
|
|
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); |
|
|
|
} |
|
|
|
} |
|
|
|