mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Seat: abstract away a view switch statement
We have our view abstraction, so why not use it?
This commit is contained in:
parent
9a99ba604f
commit
2847e0d54f
5 changed files with 25 additions and 19 deletions
|
|
@ -44,6 +44,12 @@ for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator,
|
|||
wlr_xdg_surface_for_each_surface(view->xdg_surface, iterator, data);
|
||||
}
|
||||
|
||||
static struct wlr_surface *
|
||||
wlr_surface_at(struct cg_view *view, double sx, double sy, double *sub_x, double *sub_y)
|
||||
{
|
||||
return wlr_xdg_surface_surface_at(view->xdg_surface, sx, sy, sub_x, sub_y);
|
||||
}
|
||||
|
||||
static bool
|
||||
is_primary(struct cg_view *view)
|
||||
{
|
||||
|
|
@ -94,5 +100,6 @@ handle_xdg_shell_surface_new(struct wl_listener *listener, void *data)
|
|||
view->maximize = maximize;
|
||||
view->get_geometry = get_geometry;
|
||||
view->for_each_surface = for_each_surface;
|
||||
view->wlr_surface_at = wlr_surface_at;
|
||||
view->is_primary = is_primary;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue