mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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
557cd382dc
commit
d328f63c7d
3
calmwm.h
3
calmwm.h
@ -500,7 +500,8 @@ void menuq_clear(struct menu_q *);
|
|||||||
int parse_config(const char *, struct conf *);
|
int parse_config(const char *, struct conf *);
|
||||||
|
|
||||||
void conf_atoms(void);
|
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 *,
|
int conf_bind_kbd(struct conf *, const char *,
|
||||||
const char *);
|
const char *);
|
||||||
int conf_bind_mouse(struct conf *, const char *,
|
int conf_bind_mouse(struct conf *, const char *,
|
||||||
|
19
conf.c
19
conf.c
@ -71,19 +71,28 @@ conf_cmd_remove(struct conf *c, const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void
|
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;
|
struct autogroupwin *aw;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
aw = xmalloc(sizeof(*aw));
|
aw = xmalloc(sizeof(*aw));
|
||||||
|
|
||||||
if ((p = strchr(val, ',')) == NULL) {
|
if ((p = strchr(class, ',')) == NULL) {
|
||||||
aw->name = NULL;
|
if (name == NULL)
|
||||||
aw->class = xstrdup(val);
|
aw->name = NULL;
|
||||||
|
else
|
||||||
|
aw->name = xstrdup(name);
|
||||||
|
|
||||||
|
aw->class = xstrdup(class);
|
||||||
} else {
|
} else {
|
||||||
*(p++) = '\0';
|
*(p++) = '\0';
|
||||||
aw->name = xstrdup(val);
|
|
||||||
|
if (name == NULL)
|
||||||
|
aw->name = xstrdup(class);
|
||||||
|
else
|
||||||
|
aw->name = xstrdup(name);
|
||||||
|
|
||||||
aw->class = xstrdup(p);
|
aw->class = xstrdup(p);
|
||||||
}
|
}
|
||||||
aw->num = num;
|
aw->num = num;
|
||||||
|
Loading…
Reference in New Issue
Block a user