[layout] Add bool in client struct for maxlayout
This commit is contained in:
parent
ab87595fe8
commit
cee28e19c7
2
config.c
2
config.c
@ -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);
|
||||
|
||||
2
event.c
2
event.c
@ -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;
|
||||
|
||||
5
layout.c
5
layout.c
@ -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
2
wmfs.c
@ -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
2
wmfs.h
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user