From xemacs-m  Mon Jan 20 23:29:48 1997
Received: from UCSD.EDU (mailbox2.ucsd.edu [132.239.1.54])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id XAA27301 for <xemacs-beta@xemacs.org>; Mon, 20 Jan 1997 23:29:47 -0600 (CST)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by UCSD.EDU (8.8.3/8.6.9) with SMTP id VAA11870 for <xemacs-beta@xemacs.org>; Mon, 20 Jan 1997 21:29:47 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id VAA25355; Mon, 20 Jan 1997 21:27:22 -0800
Sender: dmoore@sdnp5.ucsd.edu
To: xemacs-beta@xemacs.org
Subject: Re: 19.15b90: frame-totally-visible-p broken
References: <QQbzjr17776.199701210159@crystal.WonderWorks.COM> 	<199701210312.TAA00931@xemacs.eng.sun.com> <QQbzjx18833.199701210318@crystal.WonderWorks.COM> <rv7ml7lj0j.fsf@sdnp5.ucsd.edu>
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
From: David Moore <dmoore@UCSD.EDU>
Date: 20 Jan 1997 21:27:16 -0800
In-Reply-To: David Moore's message of 20 Jan 1997 21:00:44 -0800
Message-ID: <rv680rlhsb.fsf@sdnp5.ucsd.edu>
Lines: 37
X-Mailer: Red Gnus v0.80/XEmacs 19.15

>>>>> "Kyle" == Kyle Jones <kyle_jones@wonderworks.com> writes:
 
Kyle> Start up XEmacs.
Kyle> (frame-totally-visible-p (selected-frame))

Kyle> in *scratch* yields nil.  If there is another window obscuring the
Kyle> frame, I don't see it.

	Patch to event-Xt.c.  Don't update the visibility parameter when
it's for a different window than the frame.

--- event-Xt.c.orig	Mon Jan 20 20:21:11 1997
+++ event-Xt.c	Mon Jan 20 21:23:42 1997
@@ -1261,10 +1261,13 @@
       break;
       
     case VisibilityNotify: /* window visiblity has changed */
-      if (event->xvisibility.state == VisibilityUnobscured)
-	FRAME_X_TOTALLY_VISIBLE_P (f) = 1;
-      else
-	FRAME_X_TOTALLY_VISIBLE_P (f) = 0;
+      if (event->xvisibility.window == XtWindow (FRAME_X_SHELL_WIDGET (f)))
+	{
+          if (event->xvisibility.state == VisibilityUnobscured)
+	    FRAME_X_TOTALLY_VISIBLE_P (f) = 1;
+          else
+	    FRAME_X_TOTALLY_VISIBLE_P (f) = 0;
+	}
       break;
       
     case ConfigureNotify:

-- 
David Moore <dmoore@ucsd.edu>       | Computer Systems Lab      __o
UCSD Dept. Computer Science - 0114  | Work: (619) 534-8604    _ \<,_
La Jolla, CA 92093-0114             | Fax:  (619) 534-1445   (_)/ (_)
<URL:http://oj.egbt.org/dmoore/>    | In a cloud bones of steel.

