summaryrefslogtreecommitdiff
path: root/app/cwm/parse.y
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-12-11 17:51:43 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-12-11 17:51:43 +0000
commit7b4c38a5f87d5af9a1c462d12eaa91446f854f5b (patch)
tree4ca51fce39ed8634ae07333b2e24159db0a52017 /app/cwm/parse.y
parent8e6da53b1b3161f0f4b9a309c0292962ef87b4da (diff)
Implement _NET_DESKTOP_NAMES, this one was a bit tricky since thespec
says that a pager can change the property at any time (most need a clientmessage). So deal with property updates. Needed to shuffle some of the other code around since we can't just use shortcut_to_name[] everywhere now. ok okan@
Diffstat (limited to 'app/cwm/parse.y')
-rw-r--r--app/cwm/parse.y20
1 files changed, 2 insertions, 18 deletions
diff --git a/app/cwm/parse.y b/app/cwm/parse.y
index 9c501bcab..337be45bf 100644
--- a/app/cwm/parse.y
+++ b/app/cwm/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.21 2009/06/20 00:22:39 okan Exp $ */
+/* $OpenBSD: parse.y,v 1.22 2009/12/11 17:51:42 oga Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -123,29 +123,13 @@ main : FONTNAME STRING {
free($3);
}
| AUTOGROUP NUMBER STRING {
- struct autogroupwin *aw;
- char *p;
-
if ($2 < 0 || $2 > 9) {
free($3);
yyerror("autogroup number out of range: %d", $2);
YYERROR;
}
- aw = xcalloc(1, sizeof(*aw));
-
- if ((p = strchr($3, ',')) == NULL) {
- aw->name = NULL;
- aw->class = xstrdup($3);
- } else {
- *(p++) = '\0';
- aw->name = xstrdup($3);
- aw->class = xstrdup(p);
- }
- aw->group = xstrdup(shortcut_to_name[$2]);
-
- TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry);
-
+ group_make_autogroup(conf, $3, $2);
free($3);
}
| IGNORE STRING {