🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36802

bug in Xlib-level SHAPE support

#36802
From: der Mouse
Date: Wed, 14 Feb 1990 03:54
88 lines
2573 bytes
			  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
Technical Details
Message-ID: <9002140354.AA18739@Larry.McRCIM.McGill.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse
From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse)
Newsgroups: comp.windows.x
Subject: bug in Xlib-level SHAPE support
Message-ID: <9002140354.AA18739@Larry.McRCIM.McGill.EDU>
Date: 14 Feb 90 03:54:10 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 88