File:  [CSRG BSD Unix] / 43BSD / contrib / X / xrefresh / xrefresh.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#include <X/mit-copyright.h>

#include <X/Xlib.h>
#include <stdio.h>
/*
 * Copyright 1985, Massachusetts Institute of Technology.
 * This program just throws up a window over the whole screen, causing
 * exposure events to be generated on all windows.  This may be useful
 * to cause the whole screen to be repainted when it has somehow gotten
 * trashed.
 */
#ifndef lint
static char *rcsid_xrefresh_c = "$Header: /var/lib/cvsd/repos/CSRG/43BSD/contrib/X/xrefresh/xrefresh.c,v 1.1.1.1 2018/04/24 16:12:55 root Exp $";
#endif

main(argc, argv)
int argc;
char **argv;
{
	Window w;

	if (XOpenDisplay(argc ? argv[1] : "\0") == NULL) 
		fprintf (stderr, "Could not open Display!\n");

	w = XCreateWindow(RootWindow, 0, 0, DisplayWidth(), DisplayHeight(),
		0, (Pixmap) 0, (Pixmap) 0);
	XMapWindow(w);			/* put it up on the screen 	*/
	XDestroyWindow(w);		/* throw it away		*/

	XFlush();			/* and make sure the server sees it*/
}
	

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.