view: add view_is_related()

Allows removing xwayland-specific stuff from seat.c.

Based on a suggestion from @Consolatis.

v2: add comments
This commit is contained in:
John Lindgren 2023-10-15 00:15:16 -04:00 committed by Consolatis
parent 9b0031aec4
commit 5c4038493f
4 changed files with 38 additions and 21 deletions

View file

@ -1285,6 +1285,17 @@ view_append_children(struct view *view, struct wl_array *children)
}
}
bool
view_is_related(struct view *view, struct wlr_surface *surface)
{
assert(view);
assert(surface);
if (view->impl->is_related) {
return view->impl->is_related(view, surface);
}
return false;
}
const char *
view_get_string_prop(struct view *view, const char *prop)
{