mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
reset autostart timestamps when windows appear
This commit is contained in:
parent
a6cae02936
commit
80e96d3ea9
19
group.c
19
group.c
@ -465,6 +465,7 @@ group_autogroup(struct client_ctx *cc)
|
||||
{
|
||||
struct screen_ctx *sc = cc->sc;
|
||||
struct autogroupwin *aw;
|
||||
struct autostartcmd *as;
|
||||
struct group_ctx *gc;
|
||||
int no = -1;
|
||||
long *grpno;
|
||||
@ -492,6 +493,24 @@ group_autogroup(struct client_ctx *cc)
|
||||
}
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(as, &Conf.autostartq, entry) {
|
||||
int end;
|
||||
char* space = strchr(as->cmd, ' ');
|
||||
if ( as->lasttime ==0 )
|
||||
continue;
|
||||
if ( space == NULL )
|
||||
end = strlen(as->cmd);
|
||||
else
|
||||
end = space - as->cmd;
|
||||
if (strncasecmp(as->cmd, cc->app_class, end) == 0 ||
|
||||
strncasecmp(as->cmd, cc->app_name, end) == 0) {
|
||||
as->lasttime = 0;
|
||||
debug("reset timer for autostart %i %s by app_class = %s, app_name = %s\n",
|
||||
as->num, as->cmd, cc->app_class, cc->app_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* no group please */
|
||||
if (no == 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user