From xemacs-m  Fri Sep 26 10:09:46 1997
Received: from black-ice.cc.vt.edu (black-ice.cc.vt.edu [128.173.14.71])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id KAA22262
	for <xemacs-beta@xemacs.org>; Fri, 26 Sep 1997 10:09:43 -0500 (CDT)
Received: from black-ice.cc.vt.edu (LOCALHOST [127.0.0.1])
	by black-ice.cc.vt.edu (8.8.7/8.8.7) with ESMTP id LAA32888;
	Fri, 26 Sep 1997 11:09:16 -0400
Message-Id: <199709261509.LAA32888@black-ice.cc.vt.edu>
To: Maurizio Vitale <Maurizio.Vitale@esat.kuleuven.ac.be>
Cc: xemacs-beta@xemacs.org
Subject: [PATCH} Re: menus misbehaving under 20.3 
In-Reply-To: Your message of "Thu, 25 Sep 1997 10:48:06 +0200."
             <199709250848.KAA22638@rubens.esat.kuleuven.ac.be> 
From: Valdis.Kletnieks@vt.edu
X-Url: http://black-ice.cc.vt.edu/~valdis/
X-Face: 34C9$Ewd2zeX+\!i1BA\j{ex+$/V'JBG#;3_noWWYPa"|,I#`R"{n@w>#:{)FXyiAS7(8t(
 ^*w5O*!8O9YTe[r{e%7(yVRb|qxsRYw`7J!`AM}m_SHaj}f8eb@d^L>BrX7iO[<!v4-0bVIpaxF#-)
 %9#a9h6JXI|T|8o6t\V?kGl]Q!1V]GtNliUtz:3},0"hkPeBuu%E,j(:\iOX-P,t7lRR#
References: <199709250734.JAA19863@rubens.esat.kuleuven.ac.be>
            <199709250848.KAA22638@rubens.esat.kuleuven.ac.be>
Mime-Version: 1.0
Content-Type: multipart/signed; boundary="==_Exmh_2013253064P";
	 micalg=pgp-md5; protocol="application/pgp-signature"
Content-Transfer-Encoding: 7bit
Date: Fri, 26 Sep 1997 11:04:43 -0400

--==_Exmh_2013253064P
Content-Type: text/plain; charset=us-ascii

On Thu, 25 Sep 1997 10:48:06 +0200, you said:
> I just tried Emacs 20.2 with default menubars (not sure where to look
> for making sure they're Lucid menus, but the file xlwmenu.c in the
> Lucid widget directory got compiled and presumibly linked and used).
> They don't have the problem XEmacs has when selecting from menus that
> hang from the left of their parents. Don't know if this data point can 
> be of any use for XEmacs.

Well, Glynn Clements posted a fix that made menubars stable enough for
me  to  work  on the  code  without  having   XEmacs submerge bvbefore
finishing loading my .emacs, so here's a *PARTIAL* fix for *this* bug.
I found 2 seperate problems here:

1) If a mouse-motion tripped while  sitting *on* a seperator, it would
"fall through"  onto  a menu below  because  it  would ignore hits  on
seperators.  2) If  it  tripped while  sitting  on the *last*  row  of
pixels, it would fall through due to a fencepost error.

*THIS IS PARTIAL*,  and still needs work.  In  particular, when a menu
that was folded left is destroyed, it fails to  refresh the menus that
were behind it.  I *think* this bug was also present  in the base -b23
source tree.

Patch is attached.  Please let me know if it breaks anything. ;)

/Valdis


*** lwlib/xlwmenu.c.dist	Thu Sep 25 13:46:49 1997
--- lwlib/xlwmenu.c	Thu Sep 25 16:51:58 1997
***************
*** 2296,2306 ****
  	    highlighted_pos->x = ws->width;
  	}
  
!       if (hit && !*hit_return && (val->type != SEPARATOR_TYPE))
  	{
! 	  if (horizontal_p && hit->x > start.x && hit->x < where.x)
  	    *hit_return = val;
! 	  else if (!horizontal_p && hit->y > start.y && hit->y < where.y)
  	    *hit_return = val;
  	}
  
--- 2296,2306 ----
  	    highlighted_pos->x = ws->width;
  	}
  
!       if (hit && !*hit_return)
  	{
! 	  if (horizontal_p && hit->x > start.x && hit->x <= where.x)
  	    *hit_return = val;
! 	  else if (!horizontal_p && hit->y > start.y && hit->y <= where.y)
  	    *hit_return = val;
  	}
  


--==_Exmh_2013253064P
Content-Type: application/pgp-signature

-----BEGIN PGP MESSAGE-----
Version: 2.6.2

iQCVAwUBNCvPCdQBOOoptg9JAQEQwQP+PpUBOc7e9Orv+ClIzlU6Hg75ZlWmuCuV
oNVtRCgMPZFnH87/eZMAm0zGbg3jXfTMgesOYI/l4XzhUwZw8Xs0528OgmW6cmeq
CM3dV54Knj6EnU2j38OsWdX0CbvDl5Jg+TPk7Km/IRrLFJSjIJcxn/+j4EXuU2zp
c4pOKU7Q16I=
=76Wj
-----END PGP MESSAGE-----

--==_Exmh_2013253064P--

