[layout/structs]: Fix max layout segfault and add typedef for unsigned type
This commit is contained in:
22
src/layout.c
22
src/layout.c
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user