BdrWidth.c revision 1ab64890
11ab64890Smrg/* $Xorg: BdrWidth.c,v 1.4 2001/02/09 02:03:31 xorgcvs Exp $ */ 21ab64890Smrg 31ab64890Smrg/* 41ab64890Smrg 51ab64890SmrgCopyright 1994, 1998 The Open Group 61ab64890Smrg 71ab64890SmrgPermission to use, copy, modify, distribute, and sell this software and its 81ab64890Smrgdocumentation for any purpose is hereby granted without fee, provided that 91ab64890Smrgthe above copyright notice appear in all copies and that both that 101ab64890Smrgcopyright notice and this permission notice appear in supporting 111ab64890Smrgdocumentation. 121ab64890Smrg 131ab64890SmrgThe above copyright notice and this permission notice shall be included 141ab64890Smrgin all copies or substantial portions of the Software. 151ab64890Smrg 161ab64890SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 171ab64890SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 181ab64890SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 191ab64890SmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 201ab64890SmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 211ab64890SmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 221ab64890SmrgOTHER DEALINGS IN THE SOFTWARE. 231ab64890Smrg 241ab64890SmrgExcept as contained in this notice, the name of The Open Group shall 251ab64890Smrgnot be used in advertising or otherwise to promote the sale, use or 261ab64890Smrgother dealings in this Software without prior written authorization 271ab64890Smrgfrom The Open Group. 281ab64890Smrg 291ab64890Smrg*/ 301ab64890Smrg/* $XFree86: xc/lib/X11/BdrWidth.c,v 1.3 2001/01/17 19:41:32 dawes Exp $ */ 311ab64890Smrg 321ab64890Smrg#ifdef HAVE_CONFIG_H 331ab64890Smrg#include <config.h> 341ab64890Smrg#endif 351ab64890Smrg#include "Xlibint.h" 361ab64890Smrg 371ab64890Smrgint 381ab64890SmrgXSetWindowBorderWidth( 391ab64890Smrg Display *dpy, 401ab64890Smrg Window w, 411ab64890Smrg unsigned int width) 421ab64890Smrg{ 431ab64890Smrg unsigned long lwidth = width; /* must be CARD32 */ 441ab64890Smrg 451ab64890Smrg register xConfigureWindowReq *req; 461ab64890Smrg LockDisplay(dpy); 471ab64890Smrg GetReqExtra(ConfigureWindow, 4, req); 481ab64890Smrg req->window = w; 491ab64890Smrg req->mask = CWBorderWidth; 501ab64890Smrg OneDataCard32 (dpy, NEXTPTR(req,xConfigureWindowReq), lwidth); 511ab64890Smrg UnlockDisplay(dpy); 521ab64890Smrg SyncHandle(); 531ab64890Smrg return 1; 541ab64890Smrg} 551ab64890Smrg 56