Mercurial > aewl
comparison client.c @ 80:8125f908c80c
several additions in mouse handling ;)
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Sun, 16 Jul 2006 00:47:40 +0200 |
parents | aabebd6e61f3 |
children | 92f0d50475be |
comparison
equal
deleted
inserted
replaced
79:aabebd6e61f3 | 80:8125f908c80c |
---|---|
190 } | 190 } |
191 | 191 |
192 void | 192 void |
193 manage(Window w, XWindowAttributes *wa) | 193 manage(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 |
199 c = emallocz(sizeof(Client)); | 199 c = emallocz(sizeof(Client)); |
200 c->win = w; | 200 c->win = w; |
221 CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); | 221 CWOverrideRedirect | CWBackPixmap | CWEventMask, &twa); |
222 | 222 |
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; | 228 |
229 | 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, |
233 GrabModeAsync, GrabModeSync, None, None); | 234 GrabModeAsync, GrabModeSync, None, None); |
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); |
242 /* mapping the window now prevents flicker */ | 243 /* mapping the window now prevents flicker */ |
243 if(c->tags[tsel]) { | 244 if(c->tags[tsel]) { |