[layout/structs]: Fix max layout segfault and add typedef for unsigned type

This commit is contained in:
Martin Duquesnoy
2008-10-15 18:58:56 +02:00
parent 336cfd7425
commit 70f6637820
3 changed files with 14 additions and 13 deletions

View File

@@ -114,24 +114,22 @@ uicb_layout_prev(uicb_t cmd)
return;
}
void
maxlayout(void)
{
Client *c;
c = nexttiled(sel);// nexttiled(clients);
for(c = nexttiled(clients); c; c = nexttiled(c->next))
{
c->tile = False;
c->lmax = True;
c->ox = c->x; c->oy = c->y;
c->ow = c->w; c->oh = c->h;
c->tile = False;
c->lmax = True;
c->ox = c->x; c->oy = c->y;
c->ow = c->w; c->oh = c->h;
client_moveresize(c, 0, (conf.ttbarheight + ((conf.bartop) ? barheight : 0)),
(mw - (conf.borderheight * 2)),
(mh - (conf.borderheight * 2) - conf.ttbarheight - barheight), False);
raiseclient(c);
client_moveresize(c, 0, (conf.ttbarheight + ((conf.bartop) ? barheight : 0)),
(mw - (conf.borderheight * 2)),
(mh - (conf.borderheight * 2) - conf.ttbarheight - barheight), False);
}
return;
}

View File

@@ -41,6 +41,9 @@
/* typedef */
typedef const char* uicb_t;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned short ushort;
/* Enum */
enum { CurNormal, CurResize, CurMove, CurLast };

View File

@@ -131,7 +131,7 @@ void unmapnotify(XEvent ev);
void getevent(void);
/* util.c */
void *emalloc(uint elemet, uint size);
void *emalloc(uint element, uint size);
ulong getcolor(char *color);
void setwinstate(Window win, long state);
void uicb_spawn(uicb_t);