mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-31 22:25:27 -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;
|
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);
|
struct wlr_compositor *compositor = wlr_compositor_create(server.wl_display, 6, server.renderer);
|
||||||
if (!compositor) {
|
if (!compositor) {
|
||||||
|
|
|
||||||
4
output.c
4
output.c
|
|
@ -71,14 +71,18 @@ static inline void
|
||||||
output_layout_add_auto(struct cg_output *output)
|
output_layout_add_auto(struct cg_output *output)
|
||||||
{
|
{
|
||||||
assert(output->scene_output != NULL);
|
assert(output->scene_output != NULL);
|
||||||
|
struct wlr_output_layout_output *layout_output =
|
||||||
wlr_output_layout_add_auto(output->server->output_layout, output->wlr_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
|
static inline void
|
||||||
output_layout_add(struct cg_output *output, int32_t x, int32_t y)
|
output_layout_add(struct cg_output *output, int32_t x, int32_t y)
|
||||||
{
|
{
|
||||||
assert(output->scene_output != NULL);
|
assert(output->scene_output != NULL);
|
||||||
|
struct wlr_output_layout_output *layout_output =
|
||||||
wlr_output_layout_add(output->server->output_layout, output->wlr_output, x, y);
|
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
|
static inline void
|
||||||
|
|
|
||||||
2
server.h
2
server.h
|
|
@ -34,6 +34,8 @@ struct cg_server {
|
||||||
|
|
||||||
enum cg_multi_output_mode output_mode;
|
enum cg_multi_output_mode output_mode;
|
||||||
struct wlr_output_layout *output_layout;
|
struct wlr_output_layout *output_layout;
|
||||||
|
struct wlr_scene_output_layout *scene_output_layout;
|
||||||
|
|
||||||
struct wlr_scene *scene;
|
struct wlr_scene *scene;
|
||||||
/* Includes disabled outputs; depending on the output_mode
|
/* Includes disabled outputs; depending on the output_mode
|
||||||
* some outputs may be disabled. */
|
* some outputs may be disabled. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue