summaryrefslogtreecommitdiff
path: root/color.c
blob: 827e02ca266df11e6cbf3391f36204da3cf39624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xlib.h>

#define START_COLOR 0xffffff

int main() {
  Display *display;
  Window window;
  int screen;


  if((display = XOpenDisplay(NULL)) == NULL) {
    printf("There was an error opening the screen: %s\n", strerror(errno));
    exit(errno);
  }
  
  screen = DefaultScreen(display);

  window = XCreateSimpleWindow(
      display,
      RootWindow(display, screen),
      10, 10,
      1000, 1000,
      0,
      BlackPixel(display, screen),
      WhitePixel(display, screen));
      
  XMapWindow(display, screen);
  XFlush(display);



}