|
|
1.1 ! root 1: #ifndef lint ! 2: static char *rcsid_Refresh_c = "$Header: Refresh.c,v 1.4 87/08/21 13:29:10 swick Exp $"; ! 3: #endif lint ! 4: ! 5: #include <X11/copyright.h> ! 6: ! 7: /* ! 8: * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. ! 9: * ! 10: * All Rights Reserved ! 11: * ! 12: * Permission to use, copy, modify, and distribute this software and its ! 13: * documentation for any purpose and without fee is hereby granted, ! 14: * provided that the above copyright notice appear in all copies and that ! 15: * both that copyright notice and this permission notice appear in ! 16: * supporting documentation, and that the name of Digital Equipment ! 17: * Corporation not be used in advertising or publicity pertaining to ! 18: * distribution of the software without specific, written prior permission. ! 19: * ! 20: * ! 21: * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ! 22: * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ! 23: * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ! 24: * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, ! 25: * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ! 26: * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS ! 27: * SOFTWARE. ! 28: */ ! 29: ! 30: ! 31: ! 32: /* ! 33: * MODIFICATION HISTORY ! 34: * ! 35: * 000 -- M. Gancarz, DEC Ultrix Engineering Group ! 36: * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group, ! 37: Western Software Lab. Convert to X11. ! 38: */ ! 39: ! 40: #ifndef lint ! 41: static char *sccsid = "@(#)Refresh.c 3.8 1/24/86"; ! 42: #endif ! 43: ! 44: #include "uwm.h" ! 45: ! 46: Bool Refresh(window, mask, button, x, y) ! 47: Window window; /* Event window. */ ! 48: int mask; /* Button/key mask. */ ! 49: int button; /* Button event detail. */ ! 50: int x, y; /* Event mouse position. */ ! 51: { ! 52: return( Redraw(RootWindow(dpy,scr), mask, button, x, y) ); ! 53: } ! 54: ! 55: ! 56: ! 57: Bool Redraw(window, mask, button, x, y) ! 58: Window window; /* Event window. */ ! 59: int mask; /* Button/key mask. */ ! 60: int button; /* Button event detail. */ ! 61: int x, y; /* Event mouse position. */ ! 62: { ! 63: XWindowAttributes winfo; /* window info. */ ! 64: Window w; /* Refresh window. */ ! 65: ! 66: /* ! 67: * Get info on the target window. ! 68: */ ! 69: status = XGetWindowAttributes(dpy, window, &winfo); ! 70: if (status == FAILURE) Error("Refresh -> Can't query target window."); ! 71: ! 72: /* ! 73: * Create and map a window which covers the target window, then destroy it. ! 74: */ ! 75: if ((w = XCreateSimpleWindow(dpy, window, 0, 0, ! 76: winfo.width, winfo.height, 0, ! 77: (Pixmap) 0, (Pixmap) 0)) == NULL) ! 78: Error("Refresh -> Can't create refresh window."); ! 79: XMapWindow(dpy, w); ! 80: XDestroyWindow(dpy, w); ! 81: XFlush(dpy); ! 82: ! 83: return(FALSE); ! 84: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.