mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
output: Add scene output layout helper manually
This commit is contained in:
parent
63c0887664
commit
f0bc13bef7
3 changed files with 9 additions and 3 deletions
2
cage.c
2
cage.c
|
|
@ -340,7 +340,7 @@ main(int argc, char *argv[])
|
|||
goto end;
|
||||
}
|
||||
|
||||
wlr_scene_attach_output_layout(server.scene, server.output_layout);
|
||||
server.scene_output_layout = wlr_scene_attach_output_layout(server.scene, server.output_layout);
|
||||
|
||||
struct wlr_compositor *compositor = wlr_compositor_create(server.wl_display, 6, server.renderer);
|
||||
if (!compositor) {
|
||||
|
|
|
|||
8
output.c
8
output.c
|
|
@ -71,14 +71,18 @@ static inline void
|
|||
output_layout_add_auto(struct cg_output *output)
|
||||
{
|
||||
assert(output->scene_output != NULL);
|
||||
wlr_output_layout_add_auto(output->server->output_layout, output->wlr_output);
|
||||
struct wlr_output_layout_output *layout_output =
|
||||
wlr_output_layout_add_auto(output->server->output_layout, output->wlr_output);
|
||||
wlr_scene_output_layout_add_output(output->server->scene_output_layout, layout_output, output->scene_output);
|
||||
}
|
||||
|
||||
static inline void
|
||||
output_layout_add(struct cg_output *output, int32_t x, int32_t y)
|
||||
{
|
||||
assert(output->scene_output != NULL);
|
||||
wlr_output_layout_add(output->server->output_layout, output->wlr_output, x, y);
|
||||
struct wlr_output_layout_output *layout_output =
|
||||
wlr_output_layout_add(output->server->output_layout, output->wlr_output, x, y);
|
||||
wlr_scene_output_layout_add_output(output->server->scene_output_layout, layout_output, output->scene_output);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
2
server.h
2
server.h
|
|
@ -34,6 +34,8 @@ struct cg_server {
|
|||
|
||||
enum cg_multi_output_mode output_mode;
|
||||
struct wlr_output_layout *output_layout;
|
||||
struct wlr_scene_output_layout *scene_output_layout;
|
||||
|
||||
struct wlr_scene *scene;
|
||||
/* Includes disabled outputs; depending on the output_mode
|
||||
* some outputs may be disabled. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue