From xemacs-m  Tue Apr  8 10:04:51 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA02181
	for <xemacs-beta@xemacs.org>; Tue, 8 Apr 1997 10:04:49 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQckka25124; Tue, 8 Apr 1997 11:04:49 -0400 (EDT)
Date: Tue, 8 Apr 1997 11:04:49 -0400 (EDT)
Message-Id: <QQckka25124.199704081504@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: 19.15: PATCH for multi-device core dump
In-Reply-To: <9704080635.AA17778@GS213.SP.CS.CMU.EDU>
References: <9704080635.AA17778@GS213.SP.CS.CMU.EDU>
X-Mailer: VM 6.24 under 19.15 XEmacs Lucid
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

Darrell Kindred writes:
 > The following causes a core dump in XEmacs 19.15 under all
 > OSes I've tried:
 > 
 >     xemacs -nw -q
 >     M-x make-frame-on-display myhost:0
 > 
 > (where myhost:0 is a valid display).  The problem is that
 > extract_xpm_color_names() instantiates specifiers using the
 > selected window (rather than the appropriate device) as the
 > domain.

I submitted the patch that makes the code do this.  The bug I
was fixing is that local colors were ignored when instantiating
XPM images.  So if an XPM had a transparant background, it would
not be matched against the buffer, window or frame background color.

 > [...]
 > --- src/glyphs-x.c.orig	Tue Mar 25 23:34:39 1997
 > +++ src/glyphs-x.c	Mon Apr  7 23:50:53 1997
 > @@ -2587,7 +2587,7 @@
 >        else
 >          {
 >            assert (COLOR_SPECIFIERP (value));
 > -          value = Fspecifier_instance (value, Qnil, Qnil, Qnil);
 > +          value = Fspecifier_instance (value, device, Qnil, Qnil);
 >          }
 >        if (NILP (value))
 >          continue;

I would prefer to find a way not to apply this.

 > @@ -2606,7 +2606,10 @@
 >    while (--i >= 0)
 >      {
 >        Lisp_Object cons = XCAR (results);
 > -      color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 > +      struct Lisp_Color_Instance *color_inst = XCOLOR_INSTANCE (XCDR (cons));
 > +
 > +      assert (color_inst->data != NULL);
 > +      color = COLOR_INSTANCE_X_COLOR (color_inst);
 >        /* Duplicate the pixel value so that we still have a lock on it if
 >  	 the pixel we were passed is later freed. */
 >        if (! XAllocColor (dpy, cmap, &color))
 > 
 > 

I didn't change this code.

