simply maximize(), insert Client *sel;
This commit is contained in:
parent
71b7860ba3
commit
f217cc3e09
31
layout.c
31
layout.c
|
@ -216,28 +216,25 @@ uicb_setlayout(awesome_config * awesomeconf,
|
||||||
static void
|
static void
|
||||||
maximize(int x, int y, int w, int h, awesome_config *awesomeconf)
|
maximize(int x, int y, int w, int h, awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
if(!*awesomeconf->client_sel)
|
Client *sel = *awesomeconf->client_sel;
|
||||||
|
|
||||||
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(((*awesomeconf->client_sel)->ismax = !(*awesomeconf->client_sel)->ismax))
|
if((sel->ismax = !sel->ismax))
|
||||||
{
|
{
|
||||||
(*awesomeconf->client_sel)->wasfloating = (*awesomeconf->client_sel)->isfloating;
|
sel->wasfloating = sel->isfloating;
|
||||||
(*awesomeconf->client_sel)->isfloating = True;
|
sel->isfloating = True;
|
||||||
(*awesomeconf->client_sel)->rx = (*awesomeconf->client_sel)->x;
|
sel->rx = sel->x;
|
||||||
(*awesomeconf->client_sel)->ry = (*awesomeconf->client_sel)->y;
|
sel->ry = sel->y;
|
||||||
(*awesomeconf->client_sel)->rw = (*awesomeconf->client_sel)->w;
|
sel->rw = sel->w;
|
||||||
(*awesomeconf->client_sel)->rh = (*awesomeconf->client_sel)->h;
|
sel->rh = sel->h;
|
||||||
resize(*awesomeconf->client_sel, x, y, w, h, awesomeconf, True);
|
resize(sel, x, y, w, h, awesomeconf, True);
|
||||||
}
|
}
|
||||||
else if((*awesomeconf->client_sel)->wasfloating)
|
else if(sel->wasfloating)
|
||||||
resize(*awesomeconf->client_sel,
|
resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, awesomeconf, True);
|
||||||
(*awesomeconf->client_sel)->rx,
|
|
||||||
(*awesomeconf->client_sel)->ry,
|
|
||||||
(*awesomeconf->client_sel)->rw,
|
|
||||||
(*awesomeconf->client_sel)->rh,
|
|
||||||
awesomeconf, True);
|
|
||||||
else
|
else
|
||||||
(*awesomeconf->client_sel)->isfloating = False;
|
sel->isfloating = False;
|
||||||
|
|
||||||
arrange(awesomeconf);
|
arrange(awesomeconf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue