From xemacs-m  Mon Jan 20 23:17:18 1997
Received: from venus.Sun.COM (venus.Sun.COM [192.9.25.5])
          by xemacs.org (8.8.4/8.8.4) with SMTP
	  id XAA27274 for <xemacs-beta@xemacs.org>; Mon, 20 Jan 1997 23:17:18 -0600 (CST)
Received: from Eng.Sun.COM ([129.146.1.25]) by venus.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id VAA22142; Mon, 20 Jan 1997 21:16:48 -0800
Received: from kindra.eng.sun.com by Eng.Sun.COM (SMI-8.6/SMI-5.3)
	id VAA15746; Mon, 20 Jan 1997 21:16:46 -0800
Received: from xemacs.eng.sun.com by kindra.eng.sun.com (SMI-8.6/SMI-SVR4)
	id VAA29892; Mon, 20 Jan 1997 21:16:46 -0800
Received: by xemacs.eng.sun.com (SMI-8.6/SMI-SVR4)
	id VAA01025; Mon, 20 Jan 1997 21:16:43 -0800
Date: Mon, 20 Jan 1997 21:16:43 -0800
Message-Id: <199701210516.VAA01025@xemacs.eng.sun.com>
From: Martin Buchholz <mrb@Eng.Sun.COM>
To: Kyle Jones <kyle_jones@wonderworks.com>
Cc: xemacs-beta@xemacs.org
Subject: 19.15b90: frame-totally-visible-p broken
In-Reply-To: <QQbzjx18833.199701210318@crystal.WonderWorks.COM>
References: <QQbzjr17776.199701210159@crystal.WonderWorks.COM>
	<199701210312.TAA00931@xemacs.eng.sun.com>
	<QQbzjx18833.199701210318@crystal.WonderWorks.COM>
Reply-To: Martin Buchholz <mrb@Eng.Sun.COM>
Mime-Version: 1.0 (generated by tm-edit 7.100)
Content-Type: text/plain; charset=US-ASCII

>>>>> "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.

>> I can reproduce this.  What a strange bug.  I bet if you make your
>> frame really wide, it yields t.

Kyle> Indeed, it does.

Here's the fix:

Mon Jan 20 21:12:57 1997  Martin Buchholz  <mrb@eng.sun.com>

	* src/event-Xt.c (emacs_Xt_handle_magic_event):
	(frame-totally-visible-p) sometimes incorrectly returned nil.

*** /tmp/geta10275	Mon Jan 20 20:45:01 1997
--- event-Xt.c	Mon Jan 20 20:44:41 1997
***************
*** 1313,1322 ****
        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;
        break;
        
      case ConfigureNotify:
--- 1312,1320 ----
        break;
        
      case VisibilityNotify: /* window visiblity has changed */
!       if (event->xvisibility.window == XtWindow (FRAME_X_SHELL_WIDGET (f)))
! 	FRAME_X_TOTALLY_VISIBLE_P (f) =
! 	  (event->xvisibility.state == VisibilityUnobscured);
        break;
        
      case ConfigureNotify:

