Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. diff --git a/src/gamma-wl.c b/src/gamma-wl.c
  2. index 8efa1c2..cc5550d 100644
  3. --- a/src/gamma-wl.c
  4. +++ b/src/gamma-wl.c
  5. @@ -38,8 +38,7 @@
  6. #include "os-compatibility.h"
  7. #include "colorramp.h"
  8.  
  9. -#include "gamma-control-client-protocol.h"
  10. -#include "orbital-authorizer-client-protocol.h"
  11. +#include "wlr-gamma-control-unstable-v1-client-protocol.h"
  12.  
  13. typedef struct {
  14. struct wl_display *display;
  15. @@ -70,25 +69,6 @@ wayland_init(wayland_state_t **state)
  16. return 0;
  17. }
  18.  
  19. -static void
  20. -authorizer_feedback_granted(void *data, struct orbital_authorizer_feedback *feedback)
  21. -{
  22. - wayland_state_t *state = data;
  23. - state->authorized = 1;
  24. -}
  25. -
  26. -static void
  27. -authorizer_feedback_denied(void *data, struct orbital_authorizer_feedback *feedback)
  28. -{
  29. - fprintf(stderr, _("Fatal: redshift was not authorized to bind the 'zwlr_gamma_control_manager_v1' interface.\n"));
  30. - exit(EXIT_FAILURE);
  31. -}
  32. -
  33. -static const struct orbital_authorizer_feedback_listener authorizer_feedback_listener = {
  34. - authorizer_feedback_granted,
  35. - authorizer_feedback_denied
  36. -};
  37. -
  38. static void
  39. registry_global(void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version)
  40. {
  41. @@ -108,23 +88,6 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id, const cha
  42. output->global_id = id;
  43. output->output = wl_registry_bind(registry, id, &wl_output_interface, 1);
  44. output->gamma_control = NULL;
  45. - } else if (strcmp(interface, "orbital_authorizer") == 0) {
  46. - struct wl_event_queue *queue = wl_display_create_queue(state->display);
  47. -
  48. - struct orbital_authorizer *auth = wl_registry_bind(registry, id, &orbital_authorizer_interface, 1u);
  49. - wl_proxy_set_queue((struct wl_proxy *)auth, queue);
  50. -
  51. - struct orbital_authorizer_feedback *feedback = orbital_authorizer_authorize(auth, "zwlr_gamma_control_manager_v1");
  52. - orbital_authorizer_feedback_add_listener(feedback, &authorizer_feedback_listener, state);
  53. -
  54. - int ret = 0;
  55. - while (!state->authorized && ret >= 0) {
  56. - ret = wl_display_dispatch_queue(state->display, queue);
  57. - }
  58. -
  59. - orbital_authorizer_feedback_destroy(feedback);
  60. - orbital_authorizer_destroy(auth);
  61. - wl_event_queue_destroy(queue);
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement