mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-13 04:28:05 -05:00
Output: abstract away a view switch statement
We have our view abstraction, so why not use it?
This commit is contained in:
parent
431320443a
commit
9a99ba604f
5 changed files with 29 additions and 21 deletions
9
view.c
9
view.c
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Cage: A Wayland kiosk.
|
||||
*
|
||||
* Copyright (C) 2018 Jente Hidskes
|
||||
* Copyright (C) 2018-2019 Jente Hidskes
|
||||
*
|
||||
* See the LICENSE file accompanying this file.
|
||||
*/
|
||||
|
|
@ -50,6 +50,13 @@ view_center(struct cg_view *view)
|
|||
view->y = (output_height - height) / 2;
|
||||
}
|
||||
|
||||
void
|
||||
view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator,
|
||||
void *data)
|
||||
{
|
||||
view->for_each_surface(view, iterator, data);
|
||||
}
|
||||
|
||||
bool
|
||||
view_is_primary(struct cg_view *view)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue