summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authoroga <oga>2009-12-11 17:51:42 +0000
committeroga <oga>2009-12-11 17:51:42 +0000
commitb35cbf81d84c97e7c444aafe491597bd6db6cfab (patch)
tree185bdf2bf9abe166225ac24f10759bad29f82b78 /parse.y
parent9b04930f24bb3acc3626f442eff074b6b80821f3 (diff)
downloadcwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.tar.gz
cwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.tar.xz
cwm-b35cbf81d84c97e7c444aafe491597bd6db6cfab.zip
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 'parse.y')
-rw-r--r--parse.y18
1 files changed, 1 insertions, 17 deletions
diff --git a/parse.y b/parse.y
index 435c2a2..c60995c 100644
--- a/parse.y
+++ b/parse.y
@@ -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 {