Make window name and window class separate parameters to conf_autogroup.
No functional change, but will be used shortly. ok okan@
This commit is contained in:
parent
559df68685
commit
955b6eef83
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $OpenBSD: calmwm.h,v 1.286 2015/03/28 23:12:47 okan Exp $
|
||||
* $OpenBSD: calmwm.h,v 1.287 2015/05/17 04:34:01 kspillner Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CALMWM_H_
|
||||
@ -500,7 +500,8 @@ void menuq_clear(struct menu_q *);
|
||||
int parse_config(const char *, struct conf *);
|
||||
|
||||
void conf_atoms(void);
|
||||
void conf_autogroup(struct conf *, int, const char *);
|
||||
void conf_autogroup(struct conf *, int, const char *,
|
||||
const char *);
|
||||
int conf_bind_kbd(struct conf *, const char *,
|
||||
const char *);
|
||||
int conf_bind_mouse(struct conf *, const char *,
|
||||
|
@ -15,7 +15,7 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* $OpenBSD: conf.c,v 1.185 2015/03/26 21:41:43 okan Exp $
|
||||
* $OpenBSD: conf.c,v 1.186 2015/05/17 04:34:01 kspillner Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -71,19 +71,28 @@ conf_cmd_remove(struct conf *c, const char *name)
|
||||
}
|
||||
}
|
||||
void
|
||||
conf_autogroup(struct conf *c, int num, const char *val)
|
||||
conf_autogroup(struct conf *c, int num, const char *name, const char *class)
|
||||
{
|
||||
struct autogroupwin *aw;
|
||||
char *p;
|
||||
|
||||
aw = xmalloc(sizeof(*aw));
|
||||
|
||||
if ((p = strchr(val, ',')) == NULL) {
|
||||
aw->name = NULL;
|
||||
aw->class = xstrdup(val);
|
||||
if ((p = strchr(class, ',')) == NULL) {
|
||||
if (name == NULL)
|
||||
aw->name = NULL;
|
||||
else
|
||||
aw->name = xstrdup(name);
|
||||
|
||||
aw->class = xstrdup(class);
|
||||
} else {
|
||||
*(p++) = '\0';
|
||||
aw->name = xstrdup(val);
|
||||
|
||||
if (name == NULL)
|
||||
aw->name = xstrdup(class);
|
||||
else
|
||||
aw->name = xstrdup(name);
|
||||
|
||||
aw->class = xstrdup(p);
|
||||
}
|
||||
aw->num = num;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: parse.y,v 1.62 2015/02/14 18:24:12 okan Exp $ */
|
||||
/* $OpenBSD: parse.y,v 1.63 2015/05/17 04:34:01 kspillner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
|
||||
@ -154,7 +154,7 @@ main : FONTNAME STRING {
|
||||
free($3);
|
||||
YYERROR;
|
||||
}
|
||||
conf_autogroup(conf, $2, $3);
|
||||
conf_autogroup(conf, $2, NULL, $3);
|
||||
free($3);
|
||||
}
|
||||
| IGNORE STRING {
|
||||
|
Loading…
Reference in New Issue
Block a user