set{nmaster,ncol,mwfact,moveresize} to work

From 842eed01c0, setnmaster, setncol,
setmwfact and setmoveresize don't work fine.
This commit is contained in:
MATSUU Takuto 2007-10-22 15:36:25 +09:00 committed by Julien Danjou
parent 03681846fa
commit b1dcf6c71b
2 changed files with 4 additions and 4 deletions

View File

@ -794,7 +794,7 @@ uicb_moveresize(awesome_config *awesomeconf,
unsigned int dui; unsigned int dui;
Window dummy; Window dummy;
if(get_current_layout(awesomeconf->tags, awesomeconf->ntags)->arrange == layout_floating) if(get_current_layout(awesomeconf->tags, awesomeconf->ntags)->arrange != layout_floating)
if(!*awesomeconf->client_sel || !(*awesomeconf->client_sel)->isfloating || (*awesomeconf->client_sel)->isfixed || !arg) if(!*awesomeconf->client_sel || !(*awesomeconf->client_sel)->isfloating || (*awesomeconf->client_sel)->isfixed || !arg)
return; return;
if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4) if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4)

View File

@ -34,7 +34,7 @@ uicb_setnmaster(awesome_config *awesomeconf,
{ {
Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags); Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags);
if(!arg || curlay->arrange != layout_tile || curlay->arrange != layout_tileleft) if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
return; return;
if((awesomeconf->nmaster = (int) compute_new_value_from_arg(arg, (double) awesomeconf->nmaster)) < 0) if((awesomeconf->nmaster = (int) compute_new_value_from_arg(arg, (double) awesomeconf->nmaster)) < 0)
@ -49,7 +49,7 @@ uicb_setncol(awesome_config *awesomeconf,
{ {
Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags); Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags);
if(!arg || curlay->arrange != layout_tile || curlay->arrange != layout_tileleft) if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
return; return;
if((awesomeconf->ncol = (int) compute_new_value_from_arg(arg, (double) awesomeconf->ncol)) < 1) if((awesomeconf->ncol = (int) compute_new_value_from_arg(arg, (double) awesomeconf->ncol)) < 1)
@ -65,7 +65,7 @@ uicb_setmwfact(awesome_config * awesomeconf,
char *newarg; char *newarg;
Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags); Layout *curlay = get_current_layout(awesomeconf->tags, awesomeconf->ntags);
if(!arg || curlay->arrange != layout_tile || curlay->arrange != layout_tileleft) if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft))
return; return;
newarg = a_strdup(arg); newarg = a_strdup(arg);