mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
xdg_shell/xwayland: do not check parent for other view types
An xdg-shell surface can never be a parent of an xwayland surface and vice-versa.
This commit is contained in:
parent
5deb7776fc
commit
a8e15442ab
2 changed files with 6 additions and 0 deletions
|
|
@ -61,6 +61,9 @@ is_primary(struct cg_view *view)
|
||||||
static bool
|
static bool
|
||||||
is_parent(struct cg_view *parent, struct cg_view *child)
|
is_parent(struct cg_view *parent, struct cg_view *child)
|
||||||
{
|
{
|
||||||
|
if (child->type != CAGE_XDG_SHELL_VIEW) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return child->xdg_surface->toplevel->parent == parent->xdg_surface;
|
return child->xdg_surface->toplevel->parent == parent->xdg_surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,9 @@ is_primary(struct cg_view *view)
|
||||||
static bool
|
static bool
|
||||||
is_parent(struct cg_view *parent, struct cg_view *child)
|
is_parent(struct cg_view *parent, struct cg_view *child)
|
||||||
{
|
{
|
||||||
|
if (child->type != CAGE_XWAYLAND_VIEW) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return child->xwayland_surface->parent == parent->xwayland_surface;
|
return child->xwayland_surface->parent == parent->xwayland_surface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue