]> git.sur5r.net Git - i3/i3/blobdiff - src/cmdparse.y
Merge branch 'master' into next
[i3/i3] / src / cmdparse.y
index 650a2eb883caf928b9cbf5694bdb0c82eb7a040f..04e8b3ca3f4cb0a8f66337a2132b5e2ceb90223f 100644 (file)
@@ -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);
@@ -537,7 +544,7 @@ kill:
         else {
             TAILQ_FOREACH(current, &owindows, owindows) {
                 printf("matching: %p / %s\n", current->con, current->con->name);
-                tree_close(current->con, $2, false);
+                tree_close(current->con, $2, false, false);
             }
         }