title: Xlib + Unity Only close allowed action
body: <p>I just want to make a sample app when the only possible action is close.
  Is this possible with Unity(Ubuntu) ?
  Do i make a mistake ?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;X11/Xlib.h&gt;
  #include &lt;X11/Xos.h&gt;
  #include &lt;X11/Xatom.h&gt;
  static void only_close(Display *display, Window window)
  {
  
      int retval;
      Atom aa = XInternAtom(display, "_NET_WM_ALLOWED_ACTIONS", False);
      Atom close = XInternAtom(display, " _NET_WM_ACTION_CLOSE", False);
  
      retval = XChangeProperty(display, window, aa, XA_ATOM, 32, PropModeReplace, (unsigned char*)close,  1);
  
      printf("###### XChangeProperty() reted %d\n", retval);
  }
  
  int main()
  {
  
      Display *dis;
      Window win;
  
      dis = XOpenDisplay(NULL);
      win = XCreateSimpleWindow(dis, RootWindow(dis, 0), 1, 1, 500, 500, \
                                0, BlackPixel (dis, 0), BlackPixel(dis, 0));
      XMapWindow(dis, win);
      printf("window %i\n", (int)win);
      only_close(dis, win);
      XFlush(dis);
      sleep(10);
      return(0);
  }
  </code></pre>