mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-21 05:33:55 -04:00
cage: add basic wlr-output-management support
Co-authored-by: Dima Krasner <dima@dimakrasner.com>
This commit is contained in:
parent
27b6971b36
commit
6f78d9d5b2
6 changed files with 170 additions and 21 deletions
14
cage.c
14
cage.c
|
|
@ -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>
|
||||
|
|
@ -340,6 +341,8 @@ main(int argc, char *argv[])
|
|||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
server.output_layout_change.notify = handle_output_layout_change;
|
||||
wl_signal_add(&server.output_layout->events.change, &server.output_layout_change);
|
||||
|
||||
server.scene = wlr_scene_create();
|
||||
if (!server.scene) {
|
||||
|
|
@ -472,6 +475,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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue