Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446 This is handy for matching specific windows of a multi-window application, for example only Pidgin’s buddy list window.
This commit is contained in:
@ -632,6 +632,7 @@ void parse_file(const char *f) {
|
||||
%token TOK_MARK "mark"
|
||||
%token TOK_CLASS "class"
|
||||
%token TOK_INSTANCE "instance"
|
||||
%token TOK_WINDOW_ROLE "window_role"
|
||||
%token TOK_ID "id"
|
||||
%token TOK_CON_ID "con_id"
|
||||
%token TOK_TITLE "title"
|
||||
@ -792,6 +793,12 @@ criterion:
|
||||
current_match.instance = regex_new($3);
|
||||
free($3);
|
||||
}
|
||||
| TOK_WINDOW_ROLE '=' STR
|
||||
{
|
||||
printf("criteria: window_role = %s\n", $3);
|
||||
current_match.role = regex_new($3);
|
||||
free($3);
|
||||
}
|
||||
| TOK_CON_ID '=' STR
|
||||
{
|
||||
printf("criteria: id = %s\n", $3);
|
||||
|
Reference in New Issue
Block a user