]> git.mdlowis.com Git - proto/labwc.git/commitdiff
window-rules: fix window rules not being applied
authortokyo4j <hrak1529@gmail.com>
Mon, 25 Aug 2025 09:54:22 +0000 (18:54 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Mon, 25 Aug 2025 14:42:00 +0000 (23:42 +0900)
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.

src/view.c
src/window-rules.c

index 8ddef7d4aee64ee523c70fbf5cd0a2d0dfd79c7c..8c697daf2f91c3dd76b1820102586b29ce5e0f82 100644 (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;
index ed980efc4edcbfc30d23275ce9a892a239c7900e..8283e8016041a85d217be4a0422c52643c289158 100644 (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)) {