Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/gamma-wl.c b/src/gamma-wl.c
- index 8efa1c2..cc5550d 100644
- --- a/src/gamma-wl.c
- +++ b/src/gamma-wl.c
- @@ -38,8 +38,7 @@
- #include "os-compatibility.h"
- #include "colorramp.h"
- -#include "gamma-control-client-protocol.h"
- -#include "orbital-authorizer-client-protocol.h"
- +#include "wlr-gamma-control-unstable-v1-client-protocol.h"
- typedef struct {
- struct wl_display *display;
- @@ -70,25 +69,6 @@ wayland_init(wayland_state_t **state)
- return 0;
- }
- -static void
- -authorizer_feedback_granted(void *data, struct orbital_authorizer_feedback *feedback)
- -{
- - wayland_state_t *state = data;
- - state->authorized = 1;
- -}
- -
- -static void
- -authorizer_feedback_denied(void *data, struct orbital_authorizer_feedback *feedback)
- -{
- - fprintf(stderr, _("Fatal: redshift was not authorized to bind the 'zwlr_gamma_control_manager_v1' interface.\n"));
- - exit(EXIT_FAILURE);
- -}
- -
- -static const struct orbital_authorizer_feedback_listener authorizer_feedback_listener = {
- - authorizer_feedback_granted,
- - authorizer_feedback_denied
- -};
- -
- static void
- registry_global(void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version)
- {
- @@ -108,23 +88,6 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id, const cha
- output->global_id = id;
- output->output = wl_registry_bind(registry, id, &wl_output_interface, 1);
- output->gamma_control = NULL;
- - } else if (strcmp(interface, "orbital_authorizer") == 0) {
- - struct wl_event_queue *queue = wl_display_create_queue(state->display);
- -
- - struct orbital_authorizer *auth = wl_registry_bind(registry, id, &orbital_authorizer_interface, 1u);
- - wl_proxy_set_queue((struct wl_proxy *)auth, queue);
- -
- - struct orbital_authorizer_feedback *feedback = orbital_authorizer_authorize(auth, "zwlr_gamma_control_manager_v1");
- - orbital_authorizer_feedback_add_listener(feedback, &authorizer_feedback_listener, state);
- -
- - int ret = 0;
- - while (!state->authorized && ret >= 0) {
- - ret = wl_display_dispatch_queue(state->display, queue);
- - }
- -
- - orbital_authorizer_feedback_destroy(feedback);
- - orbital_authorizer_destroy(auth);
- - wl_event_queue_destroy(queue);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement