From: Hal Mueller
Subject: CLX/Common Windows with Tektronix XP series X terminals, Allegro CL
Date: 
Message-ID: <11647@helios.TAMU.EDU>
Common Windows is a graphics package from Franz Inc. built on top of 
CLX.  I'm unable to start Common Windows with Tektronix XP27 or XP29 
terminals, and have traced the problem to CLX (a modified version
shipped by Franz).

The crash occurs in xlib:query-tree, in the lookup-window call in the line
      (setq parent (and (plusp parent) (lookup-window display parent)))

Error message is
Debug: ID 40 from display #<xlib:display wfsc2:0 (Tektronix, Inc. R1)> should have been a xlib:window, but was :WM_NORMAL_HINTS

ID 40 is the ID of the root window, and is always the ID reported.

I've reported this problem to both vendors, but haven't heard from them yet; 
can anyone shed any light?  Has anyone used the XP series Tektronix terminals
with Allegro Common Lisp?  Trace available on request.

The following code reproduces the bug:

(in-package 'user)

(defvar display)
(defvar screen)
(defvar root)
(defvar white)
(defvar window)
(defvar gcontext)

(defun start ()
  (setq display (xlib:open-display "wfsc2"))
  (setq screen (xlib:display-default-screen display))
  (setq root (xlib:screen-root screen))
  (setq white (xlib:screen-white-pixel screen))
  (setq window (xlib:create-window :parent root :x 300 :y 100
                :width 200 :height 200 :background white
                :border-width 2 :override-redirect :on))
  (xlib:map-window window)
  (xlib:display-finish-output display)
  (format t "We have just created a window and drawn it on the screen.~%")
  (format t "Now, type (xlib:query-tree window).~%")
  (format t "You should get NIL, the parent, and the root.~%")
  (format t "Try it.  Then say (stop) to destroy the window.~%~%"))

(defun stop ()
  (xlib:unmap-window window)
  (xlib:display-finish-output display))

(format t "Type (start)~%~%")

--
Hal Mueller               Remember that the only thing the USAF and USN have
········@wfsc4.tamu.edu   ever agreed on is that the Army shouldn't have
······@tamunix.Bitnet     fixed-wing aircraft.  --Mary Shafer