ForEach: initialize view query window_type correctly

Before this patch, the window type would be checked even if
not actually requested to do so.

Fixes: #1852
This commit is contained in:
Consolatis 2024-05-27 19:55:16 +02:00 committed by Johan Malm
parent 95e4c0d8d7
commit 6f3f2aae27
3 changed files with 16 additions and 1 deletions

View file

@ -53,6 +53,14 @@ view_from_wlr_surface(struct wlr_surface *surface)
return NULL;
}
struct view_query *
view_query_create(void)
{
struct view_query *query = znew(*query);
query->window_type = -1;
return query;
}
void
view_query_free(struct view_query *query)
{