aboutsummaryrefslogtreecommitdiff
path: root/sway/server.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-03-06 17:17:05 +0100
committerSimon Ser <contact@emersion.fr>2023-06-08 22:11:50 +0200
commitb1b3563d5483482e19616aec0e70de970a591580 (patch)
tree4252044012aa9ff3eee196a236befeba649c0cf1 /sway/server.c
parent913a7679cbde98df0722b326d8c3cfc0f0576f6d (diff)
Handle gamma-control-v1 set_gamma events
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4046
Diffstat (limited to 'sway/server.c')
-rw-r--r--sway/server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/server.c b/sway/server.c
index c87e30fd..9797cf60 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -114,7 +114,11 @@ bool server_init(struct sway_server *server) {
server->data_device_manager =
wlr_data_device_manager_create(server->wl_display);
- wlr_gamma_control_manager_v1_create(server->wl_display);
+ server->gamma_control_manager_v1 =
+ wlr_gamma_control_manager_v1_create(server->wl_display);
+ server->gamma_control_set_gamma.notify = handle_gamma_control_set_gamma;
+ wl_signal_add(&server->gamma_control_manager_v1->events.set_gamma,
+ &server->gamma_control_set_gamma);
server->new_output.notify = handle_new_output;
wl_signal_add(&server->backend->events.new_output, &server->new_output);