[comp.windows.x] CLX Resource ID Bug?

cjl@AI.MIT.EDU (Chris Lindblad) (05/03/90)

    Date: Wed, 25 Apr 90 16:20:19 EDT
    From: Bill.Chiles@chiles.slisp.cs.cmu.edu

    I think there is a bug in CLX 4.1 regarding how it maps resource ID's and
    atom ID's.  From page 9 of X Window System Protocol:
       The client allocates resource ID's for types WINDOW, PIXMAP, CURSOR,
       FONT, GCONTEXT, and COLORMAP by ....  An ID must be unique with respect
       to the ID's of all all other resources, not just other resources of the
       same type.  However, note that the value spaces of resource identifiers,
       atoms, visualids, and keysyms are distinguishable by context, and as
       such, are not required to be disjoint; for example, a given numeric
       value might be both a window ID, a valid atom, and a valid keysym.

    This says to me that the identifiers used for atoms must be distinct from
    resource ID's.  The problem is that the code in display.lisp uses the
    display's resource-id-map to handle atoms.  I think the protocol requires
    CLX to use a distinct hash table.

    The problem I have is the X11 maintainer at my site recently added MIT
    changes and recompiled all of X11 causing it to suddenly begin using ID 35
    for the root window.  When I get this from the server in an event or data
    exchange, it gets mapped to :wm_hints (not a xlib:window).  As an aside,
    we've been using the R3 CLX with an R4 server, but two things:
       1] this has worked for quite some time.
       2] the code is exactly the same between the two version regarding this
	  resource ID's and atom ID's.

    Does anyone have a patch for this?

Thanks to patches supplied by Charlie Hornig of Symbolics, a new version of
CLX is now available for FTP from expo.lcs.mit.edu, which fixes this problem.
The new version also conains a few other changes, listed below.

The new version is available for anonymous FTP from:

  expo.lcs.mit.edu:/contrib/CLX.R4.2.tar.Z

R4.2 changes:

o Atoms and visuals are now correctly maintained in a separate namespace from 
  windows, pixmaps, cursors, fonts, gcontexts, and colormaps.

o I have made an attempt to make socket code work for kcl and ibcl.  I have
  akcl here, but not kcl and ibcl, so it's only guesswork that kcl and ibcl 
  works.

o compile-clx and load-clx do more pathname merging to work around problems
  in some lisp implementations. *default-pathname-defaults* is never bound 
  anymore.

o Some ansi common lisp stuff.  If you have :ansi-common-lisp on *features*,
  CLX will:

  - Use the common-lisp package instead of the lisp package.

  - Use the common lisp condition system, being careful not to stomp on 
    define-condition and type-error.

  - Use declaim instead of proclaim.

  - Use the dynamic-extent declaration for rest args and closures.

  - Use print-unreadable-object.

o Code compiled with the R4 and R4.1 CLX will work with the R4.2 CLX, provided
  you don't have :ansi-common-lisp on your features list.  Code compiled with 
  the R4.2 CLX will NOT work with the R4 CLX.