All pastes #168254 Raw Edit

Mine

public c v1 · immutable
·published 2006-09-12 20:58 UTC
rendered paste body
#include <stdlib.h>#include <stdio.h>#include <unistd.h>#include <X11/Xlib.h>#include <X11/Xatom.h>int main() {  Display *display;  Window panel;  char *propertyValue;  int killed = 0;  if ((display = XOpenDisplay(NULL)) == NULL) {    fprintf(stderr, "Cannot connect to X server\n");    exit (EXIT_FAILURE);  }  panel = XCreateWindow(			display, /* display */			DefaultRootWindow(display), /* parent */			0, 0, /* position */			200, 100, /* size */			0, /* border width */			CopyFromParent, /* depth */			InputOutput, /* class */			CopyFromParent, /* visual */			0, /* valuemask */			0 /* attributes */			);  propertyValue = "_NET_WM_WINDOW_TYPE_DOCK";  XChangeProperty(		  display, 		  panel, 		  XInternAtom(display, "_NET_WM_WINDOW_TYPE", 0), 		  XA_ATOM, 		  32, 		  PropModeReplace, 		  (unsigned char *) &propertyValue, 		  1);  XMapWindow(display, panel);  while (!killed) {    XFlush(display);    sleep(10);    killed++;  }  XCloseDisplay(display);  return (EXIT_SUCCESS);}