From xemacs-m  Wed Apr  9 01:41:39 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 BAA09373
	for <xemacs-beta@xemacs.org>; Wed, 9 Apr 1997 01:41:37 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQckmk06557; Wed, 9 Apr 1997 02:41:35 -0400 (EDT)
Date: Wed, 9 Apr 1997 02:41:35 -0400 (EDT)
Message-Id: <QQckmk06557.199704090641@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: 20.1b11: [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 20.1 XEmacs Lucid (beta11)
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 have a patch for this that preserves the background color fix
that I added earlier.  We really do want to use a window, but we
have to use the correct window and certainly can't rely on there
being a "selected window" at the time this function is called.

*** 1.1	1997/04/09 06:03:20
--- src/glyphs-x.c	1997/04/09 06:09:59
***************
*** 2588,2595 ****
  	    (value, device, encode_error_behavior_flag (ERROR_ME_NOT));
        else
          {
            assert (COLOR_SPECIFIERP (value));
!           value = Fspecifier_instance (value, Qnil, Qnil, Qnil);
          }
        if (NILP (value))
          continue;
--- 2588,2597 ----
  	    (value, device, encode_error_behavior_flag (ERROR_ME_NOT));
        else
          {
+ 	  Lisp_Object frame = DEVICE_SELECTED_FRAME(XDEVICE(device));
+ 	  Lisp_Object window = FRAME_SELECTED_WINDOW(XFRAME(frame));
            assert (COLOR_SPECIFIERP (value));
!           value = Fspecifier_instance (value, window, Qnil, Qnil);
          }
        if (NILP (value))
          continue;

