summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/client.c b/client.c
index c797972..889daa5 100644
--- a/client.c
+++ b/client.c
@@ -97,6 +97,7 @@ Client *
97getclient(Window w) 97getclient(Window w)
98{ 98{
99 Client *c; 99 Client *c;
100
100 for(c = clients; c; c = c->next) 101 for(c = clients; c; c = c->next)
101 if(c->win == w) 102 if(c->win == w)
102 return c; 103 return c;
@@ -107,6 +108,7 @@ Client *
107getctitle(Window w) 108getctitle(Window w)
108{ 109{
109 Client *c; 110 Client *c;
111
110 for(c = clients; c; c = c->next) 112 for(c = clients; c; c = c->next)
111 if(c->title == w) 113 if(c->title == w)
112 return c; 114 return c;
@@ -198,8 +200,8 @@ manage(Window w, XWindowAttributes *wa)
198{ 200{
199 int diff; 201 int diff;
200 Client *c; 202 Client *c;
201 XSetWindowAttributes twa;
202 Window trans; 203 Window trans;
204 XSetWindowAttributes twa;
203 205
204 c = emallocz(sizeof(Client)); 206 c = emallocz(sizeof(Client));
205 c->win = w; 207 c->win = w;
@@ -278,6 +280,7 @@ void
278pop(Client *c) 280pop(Client *c)
279{ 281{
280 Client **l; 282 Client **l;
283
281 for(l = &clients; *l && *l != c; l = &(*l)->next); 284 for(l = &clients; *l && *l != c; l = &(*l)->next);
282 *l = c->next; 285 *l = c->next;
283 286
@@ -289,9 +292,9 @@ pop(Client *c)
289void 292void
290resize(Client *c, Bool inc, Corner sticky) 293resize(Client *c, Bool inc, Corner sticky)
291{ 294{
292 XConfigureEvent e;
293 int right = c->x + c->w;
294 int bottom = c->y + c->h; 295 int bottom = c->y + c->h;
296 int right = c->x + c->w;
297 XConfigureEvent e;
295 298
296 if(inc) { 299 if(inc) {
297 if(c->incw) 300 if(c->incw)
@@ -337,8 +340,9 @@ resize(Client *c, Bool inc, Corner sticky)
337void 340void
338setsize(Client *c) 341setsize(Client *c)
339{ 342{
340 XSizeHints size;
341 long msize; 343 long msize;
344 XSizeHints size;
345
342 if(!XGetWMNormalHints(dpy, c->win, &size, &msize) || !size.flags) 346 if(!XGetWMNormalHints(dpy, c->win, &size, &msize) || !size.flags)
343 size.flags = PSize; 347 size.flags = PSize;
344 c->flags = size.flags; 348 c->flags = size.flags;
@@ -375,9 +379,9 @@ setsize(Client *c)
375void 379void
376settitle(Client *c) 380settitle(Client *c)
377{ 381{
378 XTextProperty name;
379 int n;
380 char **list = NULL; 382 char **list = NULL;
383 int n;
384 XTextProperty name;
381 385
382 name.nitems = 0; 386 name.nitems = 0;
383 c->name[0] = 0; 387 c->name[0] = 0;