[layout] Add bool in client struct for maxlayout

This commit is contained in:
Martin Duquesnoy 2008-10-02 07:21:15 +02:00
parent ab87595fe8
commit cee28e19c7
5 changed files with 8 additions and 5 deletions

View File

@ -305,7 +305,7 @@ init_conf(void)
/* layout */
conf.nlayout = cfg_size(cfg_layouts, "layout");
if(conf.nlayout > )
if(conf.nlayout > 3)
{
printf("WMFS Configuration: Too much of layouts\n");
exit(EXIT_FAILURE);

View File

@ -260,7 +260,7 @@ configurerequest(XEvent ev)
Client *c;
XWindowChanges wc;
if((c = getclient(ev.xconfigurerequest.window)))
if(c->tile)
if(c->tile || c->lmax)
return;
wc.x = ev.xconfigurerequest.x;
wc.y = ev.xconfigurerequest.y;

View File

@ -43,10 +43,11 @@ freelayout(void)
{
if(!ishide(c))
{
if(c->tile)
if(c->tile || c->lmax)
{
moveresize(c, c->ox, c->oy, c->ow, c->oh, True);
c->tile = False;
c->lmax = False;
}
}
}
@ -103,6 +104,7 @@ maxlayout(void)
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;
@ -192,6 +194,7 @@ tile(void)
for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next), i++)
{
c->max = False;
c->lmax = False;
c->tile = True;
c->ox = c->x; c->oy = c->y;
c->ow = c->w; c->oh = c->h;

2
wmfs.c
View File

@ -583,7 +583,7 @@ mouseaction(Client *c, int x, int y, int type)
int ocx, ocy;
XEvent ev;
if(c->max || c->tile)
if(c->max || c->tile || c->lmax)
return;
ocx = c->x;

2
wmfs.h
View File

@ -85,7 +85,7 @@ struct Client
Window tbar; /* Titlebar */
Window button; /* Close Button */
Bool max, tile, free; /* Client Info */
Bool hint, hide; /* Client Info² */
Bool hint, hide, lmax;/* Client Info² */
/* Struct in chains */
Client *next; /* Next client */
Client *prev; /* Previous client */