Bugfix: Ignore for_window commands with empty (invalid) criteria (+test) (Thanks aksr)

This commit is contained in:
Michael Stapelberg
2011-09-11 22:51:59 +01:00
parent a65b5fd910
commit 2a215fd7e2
2 changed files with 41 additions and 0 deletions

View File

@ -659,6 +659,10 @@ bindsym:
for_window:
TOK_FOR_WINDOW match command
{
if (match_is_empty(&current_match)) {
ELOG("Match is empty, ignoring this for_window statement\n");
break;
}
printf("\t should execute command %s for the criteria mentioned above\n", $3);
Assignment *assignment = scalloc(sizeof(Assignment));
assignment->type = A_COMMAND;