summaryrefslogtreecommitdiffstats
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
parentfixed XSync handling and finished man page (diff)
downloaddwm-901b3ed9b7e3e4c7542797301ae2442938bcea20.tar.gz
dwm-901b3ed9b7e3e4c7542797301ae2442938bcea20.zip
several additions in mouse handling ;)
Diffstat (limited to '')
-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)
192void 192void
193manage(Window w, XWindowAttributes *wa) 193manage(Window w, XWindowAttributes *wa)
194{ 194{
195 Client *c, **l; 195 Client *c;
196 XSetWindowAttributes twa; 196 XSetWindowAttributes twa;
197 Window trans; 197 Window trans;
198 198
@@ -223,10 +223,11 @@ manage(Window w, XWindowAttributes *wa)
223 settitle(c); 223 settitle(c);
224 settags(c); 224 settags(c);
225 225
226 for(l = &clients; *l; l = &(*l)->next); 226 c->next = clients;
227 c->next = *l; /* *l == nil */ 227 clients = c;
228 *l = c;
229 228
229 XGrabButton(dpy, Button1, ControlMask, c->win, False, ButtonPressMask,
230 GrabModeAsync, GrabModeSync, None, None);
230 XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask, 231 XGrabButton(dpy, Button1, Mod1Mask, c->win, False, ButtonPressMask,
231 GrabModeAsync, GrabModeSync, None, None); 232 GrabModeAsync, GrabModeSync, None, None);
232 XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask, 233 XGrabButton(dpy, Button2, Mod1Mask, c->win, False, ButtonPressMask,
@@ -234,8 +235,8 @@ manage(Window w, XWindowAttributes *wa)
234 XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask, 235 XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
235 GrabModeAsync, GrabModeSync, None, None); 236 GrabModeAsync, GrabModeSync, None, None);
236 237
237 if(!c->dofloat) 238 if(!c->isfloat)
238 c->dofloat = trans 239 c->isfloat = trans
239 || ((c->maxw == c->minw) && (c->maxh == c->minh)); 240 || ((c->maxw == c->minw) && (c->maxh == c->minh));
240 241
241 arrange(NULL); 242 arrange(NULL);