/* * Copyright status: This file is in the public domain. In * jurisdictions where a copyright holder cannot explicitly release IP * into the public domain, this should be interpreted as the closest * available approximation, probably something like "you are granted a * license to use this file in any way you see fit". * * This is a tiny test program to test for an X server bug. * * The bug is that, when issuing a ChangeGC request with the invalid * clip pixmap ID 0x2000001a, the returned error reports the invalid * pixmap value as 0, not 0x2000001a. * * The XDrawPoint call is just to force use of the GC. Without this or * something like it, Xlib "helpfully" won't push the GC change, at * least in some versions. */ #include extern const char *__progname; static Display *disp; static Screen *scr; static Window rootwin; static GC gc; int main(void); int main(void) { XGCValues v; disp = XOpenDisplay(0); scr = XDefaultScreenOfDisplay(disp); rootwin = XRootWindowOfScreen(scr); gc = XDefaultGCOfScreen(scr); v.clip_mask = 0x2000001a; XChangeGC(disp,gc,GCClipMask,&v); XDrawPoint(disp,rootwin,gc,0,0); XSync(disp,True); exit(0); }