|
|
1.1 ! root 1: #include <X/mit-copyright.h> ! 2: ! 3: #include <X/Xlib.h> ! 4: #include <stdio.h> ! 5: /* ! 6: * Copyright 1985, Massachusetts Institute of Technology. ! 7: * This program just throws up a window over the whole screen, causing ! 8: * exposure events to be generated on all windows. This may be useful ! 9: * to cause the whole screen to be repainted when it has somehow gotten ! 10: * trashed. ! 11: */ ! 12: #ifndef lint ! 13: static char *rcsid_xrefresh_c = "$Header: xrefresh.c,v 10.7 86/11/19 19:47:57 jg Rel $"; ! 14: #endif ! 15: ! 16: main(argc, argv) ! 17: int argc; ! 18: char **argv; ! 19: { ! 20: Window w; ! 21: ! 22: if (XOpenDisplay(argc ? argv[1] : "\0") == NULL) { ! 23: fprintf(stderr, "%s: Can't open display '%s'\n", ! 24: argv[0], XDisplayName(argc ? argv[1] : "\0")); ! 25: exit(1); ! 26: } ! 27: ! 28: ! 29: w = XCreateWindow(RootWindow, 0, 0, DisplayWidth(), DisplayHeight(), ! 30: 0, (Pixmap) 0, (Pixmap) 0); ! 31: XMapWindow(w); /* put it up on the screen */ ! 32: XDestroyWindow(w); /* throw it away */ ! 33: ! 34: XFlush(); /* and make sure the server sees it*/ ! 35: } ! 36:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.