window-rules: fix window rules not being applied

In 943f5751, I initialized heap-allocated `view_query` used for
`If` actions with `decoration=LAB_SSD_MODE_INVALID`, but I forgot to do
that for stack-allocated `view_query` used for window rules.
This commit is contained in:
tokyo4j 2025-08-25 18:54:22 +09:00 committed by Hiroaki Yamamoto
parent ebd39dfe0d
commit 55ee96761a
2 changed files with 3 additions and 0 deletions

View file

@ -78,6 +78,7 @@ struct view_query *
view_query_create(void)
{
struct view_query *query = znew(*query);
/* Must be synced with view_matches_criteria() in window-rules.c */
query->window_type = -1;
query->maximized = VIEW_AXIS_INVALID;
query->decoration = LAB_SSD_MODE_INVALID;

View file

@ -36,7 +36,9 @@ view_matches_criteria(struct window_rule *rule, struct view *view)
.window_type = rule->window_type,
.sandbox_engine = rule->sandbox_engine,
.sandbox_app_id = rule->sandbox_app_id,
/* Must be synced with view_query_create() */
.maximized = VIEW_AXIS_INVALID,
.decoration = LAB_SSD_MODE_INVALID,
};
if (rule->match_once && other_instances_exist(view, &query)) {