getclient(Window w)
{
Client *c;
+
for(c = clients; c; c = c->next)
if(c->win == w)
return c;
getctitle(Window w)
{
Client *c;
+
for(c = clients; c; c = c->next)
if(c->title == w)
return c;
{
int diff;
Client *c;
- XSetWindowAttributes twa;
Window trans;
+ XSetWindowAttributes twa;
c = emallocz(sizeof(Client));
c->win = w;
pop(Client *c)
{
Client **l;
+
for(l = &clients; *l && *l != c; l = &(*l)->next);
*l = c->next;
void
resize(Client *c, Bool inc, Corner sticky)
{
- XConfigureEvent e;
- int right = c->x + c->w;
int bottom = c->y + c->h;
+ int right = c->x + c->w;
+ XConfigureEvent e;
if(inc) {
if(c->incw)
void
setsize(Client *c)
{
- XSizeHints size;
long msize;
+ XSizeHints size;
+
if(!XGetWMNormalHints(dpy, c->win, &size, &msize) || !size.flags)
size.flags = PSize;
c->flags = size.flags;
void
settitle(Client *c)
{
- XTextProperty name;
- int n;
char **list = NULL;
+ int n;
+ XTextProperty name;
name.nitems = 0;
c->name[0] = 0;