From b1dcf6c71bcb564ceeb07c3b33c0899f6e36993f Mon Sep 17 00:00:00 2001 From: MATSUU Takuto Date: Mon, 22 Oct 2007 15:36:25 +0900 Subject: [PATCH] set{nmaster,ncol,mwfact,moveresize} to work From 842eed01c01be9a4d315c57e9dfcc8bb590bc5cb, setnmaster, setncol, setmwfact and setmoveresize don't work fine. --- client.c | 2 +- layouts/tile.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index a098644b..f137f14b 100644 --- a/client.c +++ b/client.c @@ -794,7 +794,7 @@ uicb_moveresize(awesome_config *awesomeconf, unsigned int dui; 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) return; if(sscanf(arg, "%s %s %s %s", x, y, w, h) != 4) diff --git a/layouts/tile.c b/layouts/tile.c index e5dcc451..4c61c1c1 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -34,7 +34,7 @@ uicb_setnmaster(awesome_config *awesomeconf, { 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; 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); - if(!arg || curlay->arrange != layout_tile || curlay->arrange != layout_tileleft) + if(!arg || (curlay->arrange != layout_tile && curlay->arrange != layout_tileleft)) return; 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; 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; newarg = a_strdup(arg);