summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-08-29 14:26:12 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-08-29 14:26:12 -0400
commit06f6f74dc69d461d7bc6e7bf9d03bc40d5e0c2c5 (patch)
tree93b9b37d8c6de2b1c851b7c4ed2d537bddc96b8a
parentaa9a48fdb041b90df9a88c5175dd7e0681f10894 (diff)
tidy
-rw-r--r--ggamma.c17
1 files 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 <stdlib.h> /* for getenv(3) */
#include <error.h> /* for error(3) */
#include <stdint.h> /* for uint16_t */
-#include <stdio.h>
-#include <X11/Xlib.h> /* for Display, XOpenDisplay(3) */
+#include <X11/Xlib.h>
-#include <X11/extensions/Xrandr.h> /* for XRRQueryExtension(3) */
+#include <X11/extensions/Xrandr.h>
#include <gtk/gtk.h>
@@ -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);