mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-05 04:06:24 -05:00
view: add view_has_children to query if a view has children
This allows us to check per-view whether is has dialogs open, instead of diong it on a global basis as we are doing currently. This is necessary for fully supporting multiple primary clients.
This commit is contained in:
parent
112a662ebc
commit
b0bd4e680d
4 changed files with 28 additions and 0 deletions
2
view.h
2
view.h
|
|
@ -49,6 +49,7 @@ struct cg_view {
|
|||
struct wlr_surface *(*wlr_surface_at)(struct cg_view *view, double sx, double sy,
|
||||
double *sub_x, double *sub_y);
|
||||
bool (*is_primary)(struct cg_view *view);
|
||||
bool (*is_parent)(struct cg_view *parent, struct cg_view *child);
|
||||
};
|
||||
|
||||
void view_activate(struct cg_view *view, bool activate);
|
||||
|
|
@ -56,6 +57,7 @@ void view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t ite
|
|||
struct wlr_surface *view_wlr_surface_at(struct cg_view *view, double sx, double sy,
|
||||
double *sub_x, double *sub_y);
|
||||
bool view_is_primary(struct cg_view *view);
|
||||
bool view_has_children(struct cg_server *server, struct cg_view *view);
|
||||
void view_position(struct cg_view *view);
|
||||
void view_unmap(struct cg_view *view);
|
||||
void view_map(struct cg_view *view, struct wlr_surface *surface);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue