mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
specific last match for autogroup; few iterations with Kent Spillner.
This commit is contained in:
parent
7edabe94f2
commit
560acb43fc
1
cwmrc.5
1
cwmrc.5
@ -50,6 +50,7 @@ or if their name and class properties match
|
|||||||
and
|
and
|
||||||
.Ar windowclass ,
|
.Ar windowclass ,
|
||||||
respectively.
|
respectively.
|
||||||
|
The more specific last match wins.
|
||||||
.Ar group
|
.Ar group
|
||||||
is a number between 0 and 9.
|
is a number between 0 and 9.
|
||||||
If
|
If
|
||||||
|
14
group.c
14
group.c
@ -412,7 +412,7 @@ group_autogroup(struct client_ctx *cc)
|
|||||||
struct screen_ctx *sc = cc->sc;
|
struct screen_ctx *sc = cc->sc;
|
||||||
struct autogroupwin *aw;
|
struct autogroupwin *aw;
|
||||||
struct group_ctx *gc;
|
struct group_ctx *gc;
|
||||||
int no = -1;
|
int no = -1, both_match = 0;
|
||||||
long *grpno;
|
long *grpno;
|
||||||
|
|
||||||
if (cc->app_class == NULL || cc->app_name == NULL)
|
if (cc->app_class == NULL || cc->app_name == NULL)
|
||||||
@ -429,11 +429,13 @@ group_autogroup(struct client_ctx *cc)
|
|||||||
XFree(grpno);
|
XFree(grpno);
|
||||||
} else {
|
} else {
|
||||||
TAILQ_FOREACH(aw, &Conf.autogroupq, entry) {
|
TAILQ_FOREACH(aw, &Conf.autogroupq, entry) {
|
||||||
if (strcmp(aw->class, cc->app_class) == 0 &&
|
if (strcmp(aw->class, cc->app_class) == 0) {
|
||||||
(aw->name == NULL ||
|
if ((aw->name != NULL) &&
|
||||||
strcmp(aw->name, cc->app_name) == 0)) {
|
(strcmp(aw->name, cc->app_name) == 0)) {
|
||||||
no = aw->num;
|
no = aw->num;
|
||||||
break;
|
both_match = 1;
|
||||||
|
} else if (aw->name == NULL && !both_match)
|
||||||
|
no = aw->num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user