From 06f6f74dc69d461d7bc6e7bf9d03bc40d5e0c2c5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 29 Aug 2017 14:26:12 -0400 Subject: tidy --- ggamma.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ggamma.c b/ggamma.c index ac4eb35..79c3f02 100644 --- a/ggamma.c +++ b/ggamma.c @@ -1,11 +1,10 @@ #include /* for getenv(3) */ #include /* for error(3) */ #include /* for uint16_t */ -#include -#include /* for Display, XOpenDisplay(3) */ +#include -#include /* for XRRQueryExtension(3) */ +#include #include @@ -81,11 +80,13 @@ int main(int argc, char *argv[]) { XRRScreenResources *res = XRRGetScreenResourcesCurrent(display, RootWindow(display, DefaultScreen(display))); if (res->ncrtc < 1) error(1, 0, "There aren't any CRTCs on display %s's default screen (%d)", display_name, DefaultScreen(display)); - for (int i = 0; i < res->ncrtc; i++) { - RRCrtc crtc = res->crtcs[i]; - printf("crtc xid: %ld gamma_size: %d\n", crtc, XRRGetCrtcGammaSize(display, crtc)); - } - RRCrtc crtc = res->crtcs[0]; // TODO: real CTRC selection + + // TODO: real CTRC selection + //for (int i = 0; i < res->ncrtc; i++) { + // RRCrtc crtc = res->crtcs[i]; + //} + RRCrtc crtc = res->crtcs[0]; + int gamma_size = XRRGetCrtcGammaSize(display, crtc); XRRCrtcGamma *gamma = XRRGetCrtcGamma(display, crtc); -- cgit v1.2.3