aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-16 00:47:40 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-16 00:47:40 +0200
commit901b3ed9b7e3e4c7542797301ae2442938bcea20 (patch)
treeea20343294992690b7044a87a0364305bef55e3f /client.c
parente6cbe9c11e88537d74eb094ba5844f71ee57f268 (diff)
downloaddwm-901b3ed9b7e3e4c7542797301ae2442938bcea20.tar
dwm-901b3ed9b7e3e4c7542797301ae2442938bcea20.tar.gz
dwm-901b3ed9b7e3e4c7542797301ae2442938bcea20.tar.bz2
several additions in mouse handling ;)
Diffstat (limited to 'client.c')
-rw-r--r--client.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/client.c b/client.c
index 158b928..522a425 100644
--- a/client.c
+++ b/client.c
@@ -192,7 +192,7 @@ lower(Client *c)
void
manage(Window w, XWindowAttributes *wa)
{
- Client *c, **l;
+ Client *c;
XSetWindowAttributes twa;
Window trans;
@@ -223,10 +223,11 @@ manage(Window w, XWindowAttributes *wa)
settitle(c);
settags(c);
- for(l = &clients; *l; l = &(*l)->next);
- c->next = *l; /* *l == nil */
- *l = c;
+ c->next = clients;
+ clients = c;
+ XGrabButton(dpy, Button1, ControlMask, c->win, False, ButtonPressMask,
+ GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
@@ -234,8 +235,8 @@ manage(Window w, XWindowAttributes *wa)
XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
- if(!c->dofloat)
- c->dofloat = trans
+ if(!c->isfloat)
+ c->isfloat = trans
|| ((c->maxw == c->minw) && (c->maxh == c->minh));
arrange(NULL);