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:
@ -177,6 +177,7 @@ bool definitelyGreaterThan(float a, float b, float epsilon) {
|
||||
|
||||
%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"
|
||||
@ -308,6 +309,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