aboutsummaryrefslogtreecommitdiff
path: root/examples/compositor.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-09-07 10:18:28 +0900
committerGitHub <noreply@github.com>2017-09-07 10:18:28 +0900
commitc59ccbde518ac173fffe8aba16ad9c5b703f7e2a (patch)
tree56634ac125808cc53f3de76950a7a480b96095d9 /examples/compositor.c
parent586ae674ae65c64bf57653afae5378ca76ba40a7 (diff)
parent7d43d662f5cb54c13cbc4c791d97bfee30c10124 (diff)
Merge pull request #137 from emersion/gamma_control
Add gamma_control interface
Diffstat (limited to 'examples/compositor.c')
-rw-r--r--examples/compositor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/compositor.c b/examples/compositor.c
index 024324cd..ca69bdbf 100644
--- a/examples/compositor.c
+++ b/examples/compositor.c
@@ -18,6 +18,7 @@
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_data_device_manager.h>
+#include <wlr/types/wlr_gamma_control.h>
#include "wlr/types/wlr_compositor.h"
#include <wlr/xwayland.h>
#include <xkbcommon/xkbcommon.h>
@@ -37,6 +38,7 @@ struct sample_state {
struct wl_resource *focus;
struct wl_listener keyboard_bound;
struct wlr_xwayland *xwayland;
+ struct wlr_gamma_control_manager *gamma_control_manager;
int keymap_fd;
size_t keymap_size;
uint32_t serial;
@@ -162,6 +164,7 @@ int main() {
state.wl_shell = wlr_wl_shell_create(compositor.display);
state.xdg_shell = wlr_xdg_shell_v6_create(compositor.display);
state.data_device_manager = wlr_data_device_manager_create(compositor.display);
+ state.gamma_control_manager = wlr_gamma_control_manager_create(compositor.display);
state.wl_seat = wlr_seat_create(compositor.display, "seat0");
state.keyboard_bound.notify = handle_keyboard_bound;
@@ -191,6 +194,7 @@ int main() {
wlr_xwayland_destroy(state.xwayland);
close(state.keymap_fd);
wlr_seat_destroy(state.wl_seat);
+ wlr_gamma_control_manager_destroy(state.gamma_control_manager);
wlr_data_device_manager_destroy(state.data_device_manager);
wlr_xdg_shell_v6_destroy(state.xdg_shell);
wlr_wl_shell_destroy(state.wl_shell);