mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
xdg_shell: check role in is_primary
This commit is contained in:
parent
ee5410d3fb
commit
38f8566155
1 changed files with 6 additions and 3 deletions
|
|
@ -112,9 +112,12 @@ static bool
|
||||||
is_primary(struct cg_view *view)
|
is_primary(struct cg_view *view)
|
||||||
{
|
{
|
||||||
struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view);
|
struct cg_xdg_shell_view *xdg_shell_view = xdg_shell_view_from_view(view);
|
||||||
struct wlr_xdg_surface *parent = xdg_shell_view->xdg_surface->toplevel->parent;
|
struct wlr_xdg_surface *xdg_surface = xdg_shell_view->xdg_surface;
|
||||||
/* FIXME: role is 0? */
|
|
||||||
return parent == NULL; /*&& role == WLR_XDG_SURFACE_ROLE_TOPLEVEL */
|
struct wlr_xdg_surface *parent = xdg_surface->toplevel->parent;
|
||||||
|
enum wlr_xdg_surface_role role = xdg_surface->role;
|
||||||
|
|
||||||
|
return parent == NULL && role == WLR_XDG_SURFACE_ROLE_TOPLEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue