From 2cce4b95cdce5617318fc4fb5d21abe41110c27a Mon Sep 17 00:00:00 2001 From: "arg@mig29" Date: Tue, 31 Oct 2006 12:06:38 +0100 Subject: [PATCH] applied Gottox patch to simplify the resizing of col, instead of resizing the current area, it only resizes the master area in the future (seems more predictable) --- config.mk | 2 +- dwm.1 | 4 ++-- view.c | 19 ++----------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/config.mk b/config.mk index 17e15cb..2e8594a 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # dwm version -VERSION = 2.0 +VERSION = 2.1 # Customize below to fit your system diff --git a/dwm.1 b/dwm.1 index eb396e7..f1b030e 100644 --- a/dwm.1 +++ b/dwm.1 @@ -63,10 +63,10 @@ Focus previous window. Zooms/cycles current window to/from master area (tiling mode), toggles maximization current window (floating mode). .TP .B Mod1-g -Grow current area (tiling mode only). +Grow master area (tiling mode only). .TP .B Mod1-s -Shrink current area (tiling mode only). +Shrink master area (tiling mode only). .TP .B Mod1-Shift-[1..n] Apply diff --git a/view.c b/view.c index 85bfabf..4f42abe 100644 --- a/view.c +++ b/view.c @@ -196,24 +196,9 @@ isvisible(Client *c) { void resizecol(Arg *arg) { - unsigned int n; - Client *c; - - for(n = 0, c = clients; c; c = c->next) - if(isvisible(c) && !c->isfloat) - n++; - if(!sel || sel->isfloat || n < 2 || (arrange == dofloat)) + if(master + arg->i > 950 || master + arg->i < 50) return; - if(sel == getnext(clients)) { - if(master + arg->i > 950 || master + arg->i < 50) - return; - master += arg->i; - } - else { - if(master - arg->i > 950 || master - arg->i < 50) - return; - master -= arg->i; - } + master += arg->i; arrange(); }