Add basic wlr-output-management support

Fixes #118
This commit is contained in:
Dima Krasner 2021-12-22 08:29:17 +02:00 committed by Jente Hidskes
parent 5a07efd57b
commit a9b1ef6a07
4 changed files with 142 additions and 1 deletions

12
cage.c
View file

@ -28,6 +28,7 @@
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_screencopy_v1.h>
@ -445,6 +446,17 @@ main(int argc, char *argv[])
goto end;
}
server.output_manager_v1 = wlr_output_manager_v1_create(server.wl_display);
if (!server.output_manager_v1) {
wlr_log(WLR_ERROR, "Unable to create the output manager");
ret = 1;
goto end;
}
server.output_manager_apply.notify = handle_output_manager_apply;
wl_signal_add(&server.output_manager_v1->events.apply, &server.output_manager_apply);
server.output_manager_test.notify = handle_output_manager_test;
wl_signal_add(&server.output_manager_v1->events.test, &server.output_manager_test);
gamma_control_manager = wlr_gamma_control_manager_v1_create(server.wl_display);
if (!gamma_control_manager) {
wlr_log(WLR_ERROR, "Unable to create the gamma control manager");