From xemacs-m  Mon Jan 20 23:03:11 1997
Received: from UCSD.EDU (mailbox2.ucsd.edu [132.239.1.54])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id XAA27224 for <xemacs-beta@xemacs.org>; Mon, 20 Jan 1997 23:03:09 -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 VAA10886 for <xemacs-beta@xemacs.org>; Mon, 20 Jan 1997 21:03:09 -0800 (PST)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id VAA25299; Mon, 20 Jan 1997 21:00:45 -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>
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:00:44 -0800
In-Reply-To: Kyle Jones's message of Mon, 20 Jan 1997 22:18:55 -0500 (EST)
Message-ID: <rv7ml7lj0j.fsf@sdnp5.ucsd.edu>
Lines: 42
X-Mailer: Red Gnus v0.80/XEmacs 19.15

Kyle Jones <kyle_jones@wonderworks.com> writes:

> Martin Buchholz writes:
>  > >>>>> "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.
> 
> Indeed, it does.


Hmm, I can reproduce this now.  The problem seems to be in event-Xt.c
inside of emacs_Xt_handle_magic_event:

      
    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;


Running under the debugger, with no window covering the emacs frame, I
see pairs of VisibilityNotify events, the first sets totally visible to
1, the second sets it to 0.  The value of event->xvisibility.state on
the second (incorrect) call is 1.  (VisibilityUnobscured is 0).

This is while running under twm, haven't tested under other window
managers yet.

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

