From 86515291d72d9d009202ea377accea6ed3293e2f Mon Sep 17 00:00:00 2001 From: Okan Demirmen Date: Fri, 30 Jul 2010 12:28:20 +0000 Subject: revert -r1.45 of group.c (log was: fix window name and class to match cwmrc(5)). instead, fix cwmrc(5) to match the old behavior which also happens to match the example config, of which many have based their configs; this also nicely matches the output of xprop(1). clean-up of variable names as a separate commit. suggested by sthen (and something we should have done initially). discussed with and ok oga@ --- app/cwm/cwmrc.5 | 12 ++++++------ app/cwm/group.c | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'app/cwm') diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5 index e3e20edd4..095ea23cc 100644 --- a/app/cwm/cwmrc.5 +++ b/app/cwm/cwmrc.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cwmrc.5,v 1.30 2010/07/23 15:13:00 okan Exp $ +.\" $OpenBSD: cwmrc.5,v 1.31 2010/07/30 12:28:19 okan Exp $ .\" .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 23 2010 $ +.Dd $Mdocdate: July 30 2010 $ .Dt CWMRC 5 .Os .Sh NAME @@ -27,8 +27,8 @@ configuration file. The following options are accepted in the configuration file: .Pp .Bl -tag -width Ds -compact -.It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowclass,windowname +.It Ic autogroup Ar group windowname +.It Ic autogroup Ar group windowname,windowclass Control automatic window grouping, based on the class and/or name properties, where .Ar group @@ -206,8 +206,8 @@ command xmms xmms command top "xterm -e top" # Autogroup definitions -autogroup 3 "XTerm,aterm" -autogroup 3 "XTerm,xterm" +autogroup 3 "aterm,XTerm" +autogroup 3 "xterm,XTerm" # Ignore programs by that name by not drawing borders around them. ignore XMMS diff --git a/app/cwm/group.c b/app/cwm/group.c index de2e2b6cf..4261d25ae 100644 --- a/app/cwm/group.c +++ b/app/cwm/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: group.c,v 1.45 2010/06/28 12:29:04 okan Exp $ + * $Id: group.c,v 1.46 2010/07/30 12:28:19 okan Exp $ */ #include @@ -188,11 +188,12 @@ group_make_autogroup(struct conf *conf, char *class, int no) if ((p = strchr(class, ',')) == NULL) { aw->name = NULL; + aw->class = xstrdup(class); } else { *(p++) = '\0'; - aw->name = xstrdup(p); + aw->name = xstrdup(class); + aw->class = xstrdup(p); } - aw->class = xstrdup(class); aw->num = no; TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry); -- cgit v1.2.3