reset autostart timestamps when windows appear

This commit is contained in:
Michael Weber 2012-06-29 11:15:59 +02:00
parent a6cae02936
commit 80e96d3ea9

19
group.c
View File

@ -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;