#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#include <X11/Xlib.h>
#include <X11/Xutil.h>

int main (int argc, char **argv)
{
  Display *display;
  int screen;
  Window window;
  XEvent xev;
  unsigned long bg;
  
  display = XOpenDisplay (NULL);
  if (!display)
    {
      fprintf (stderr, "Cannot open display %s\n", XDisplayName (NULL));
      return 1;
    }
    
  screen = DefaultScreen (display);
  bg = WhitePixel (display, screen);

  window = XCreateSimpleWindow (display, DefaultRootWindow (display),
				0, 0, 1000, 2000, 0,
				bg, bg);
  
  XMapWindow (display, window);
  XmbSetWMProperties (display, window,
		      "Sans: 10pt blah",
		      NULL, NULL, 0, NULL, NULL, NULL);

  while (1)
    {
      XNextEvent (display, &xev);
    }
  
  return 0;
}
