mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
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:
parent
ebd39dfe0d
commit
55ee96761a
2 changed files with 3 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ struct view_query *
|
||||||
view_query_create(void)
|
view_query_create(void)
|
||||||
{
|
{
|
||||||
struct view_query *query = znew(*query);
|
struct view_query *query = znew(*query);
|
||||||
|
/* Must be synced with view_matches_criteria() in window-rules.c */
|
||||||
query->window_type = -1;
|
query->window_type = -1;
|
||||||
query->maximized = VIEW_AXIS_INVALID;
|
query->maximized = VIEW_AXIS_INVALID;
|
||||||
query->decoration = LAB_SSD_MODE_INVALID;
|
query->decoration = LAB_SSD_MODE_INVALID;
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,9 @@ view_matches_criteria(struct window_rule *rule, struct view *view)
|
||||||
.window_type = rule->window_type,
|
.window_type = rule->window_type,
|
||||||
.sandbox_engine = rule->sandbox_engine,
|
.sandbox_engine = rule->sandbox_engine,
|
||||||
.sandbox_app_id = rule->sandbox_app_id,
|
.sandbox_app_id = rule->sandbox_app_id,
|
||||||
|
/* Must be synced with view_query_create() */
|
||||||
.maximized = VIEW_AXIS_INVALID,
|
.maximized = VIEW_AXIS_INVALID,
|
||||||
|
.decoration = LAB_SSD_MODE_INVALID,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (rule->match_once && other_instances_exist(view, &query)) {
|
if (rule->match_once && other_instances_exist(view, &query)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue