mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) (02/14/90)
X Window System Bug Report xbugs@expo.lcs.mit.edu VERSION: R4 CLIENT MACHINE and OPERATING SYSTEM: Sun-3/60, release 3.5 DISPLAY TYPE: Sun bwtwo, MIT R3 sample server (any not supporting the SHAPE extension) WINDOW MANAGER: any or none AREA: Xlib-level SHAPE library (libXext.a) from R4 tape SYNOPSIS: Behavior of libXext.a SHAPE support does not match documentation. DESCRIPTION: The documentation on the C binding for the SHAPE extension says of most of the routines that they do nothing if the extension is not supported on the specified display. This is not true for (at least) XShapeQueryVersion: if the extension is missing, it prints a message and exits (!). REPEAT BY: Read the documentation for XShapeQueryVersion: Status XShapeQueryVersion (display, major_version, minor_version) Display *display; int *major_version, *minor_version; /* RETURN */ If the extension is supported, the major and minor version numbers of the extension supported by the display are set and a non-zero value is returned. Otherwise the arguments are not set and 0 is returned. Now run this: #include <X11/X.h> #include <X11/Xlib.h> #include <X11/extensions/shape.h> Display *disp; main() { int maj; int min; disp = XOpenDisplay((char *)0); if (XShapeQueryVersion(disp,&maj,&min)) { printf("Shape version %d.%d supported\n",maj,min); } else { printf("Shape not supported\n"); } XCloseDisplay(disp); exit(0); } on a server that does not support SHAPE. Get a message like Xlib: extension "SHAPE" missing on display ":0.0". and notice that the program exits rather than returning from XShapeQueryVersion. Notice that this is not the behavior described by the documentation. In my opinion, the documented behavior is better. SAMPLE FIX: None. It doesn't bother me that much. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu