changeset 36776:66a72e7c05aa

(XTread_socket) <LeaveNotify, EnterNotify>: Remove workaround code for LessTif; it doesn't work anymore.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 13 Mar 2001 14:36:25 +0000
parents 5ace71a7262b
children 4fd2da49b57d
files src/xterm.c
diffstat 1 files changed, 2 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Tue Mar 13 14:20:01 2001 +0000
+++ b/src/xterm.c	Tue Mar 13 14:36:25 2001 +0000
@@ -10236,43 +10236,9 @@
 
 	    case EnterNotify:
 	      {
-		int from_menu_bar_p = 0;
-		
 		f = x_any_window_to_frame (dpyinfo, event.xcrossing.window);
 
-#ifdef LESSTIF_VERSION
-		/* When clicking outside of a menu bar popup to close
-		   it, we get a FocusIn/ EnterNotify sequence of
-		   events.  The flag event.xcrossing.focus is not set
-		   in the EnterNotify event of that sequence because
-		   the focus is in the menu bar,
-		   event.xcrossing.window is the frame's X window.
-		   Unconditionally setting the focus frame to null in
-		   this case is not the right thing, because no event
-		   follows that could set the focus frame to the right
-		   value.
-
-		   This could be a LessTif bug, but I wasn't able to
-		   reproduce the behavior in a simple test program.
-		   On the other hand, Motif seems to not have this
-		   problem.
-
-		   (gerd, LessTif 0.92).  */
-		
-		if (!event.xcrossing.focus
-		    && f
-		    && f->output_data.x->menubar_widget)
-		  {
-		    Window focus;
-		    int revert;
-		    
-		    XGetInputFocus (FRAME_X_DISPLAY (f), &focus, &revert);
-		    if (focus == XtWindow (f->output_data.x->menubar_widget))
-		      from_menu_bar_p = 1;
-		  }
-#endif /* LESSTIF_VERSION */
-
-		if (event.xcrossing.focus || from_menu_bar_p)
+		if (event.xcrossing.focus)
 		  {
 		    /* Avoid nasty pop/raise loops.  */
 		    if (f && (!(f->auto_raise)
@@ -10325,8 +10291,6 @@
 	      f = x_top_window_to_frame (dpyinfo, event.xcrossing.window);
 	      if (f)
 		{
-		  int from_menu_bar_p = 0;
-		  
 		  if (f == dpyinfo->mouse_face_mouse_frame)
 		    {
 		      /* If we move outside the frame, then we're
@@ -10351,21 +10315,7 @@
 		      bufp += n, count += n, numchars -= n;
 		    }
 
-#ifdef LESSTIF_VERSION
-		  /* Please see the comment at the start of the
-                     EnterNotify case.  */
-		  if (!event.xcrossing.focus
-		      && f->output_data.x->menubar_widget)
-		    {
-		      Window focus;
-		      int revert;
-		      XGetInputFocus (FRAME_X_DISPLAY (f), &focus, &revert);
-		      if (focus == XtWindow (f->output_data.x->menubar_widget))
-			from_menu_bar_p = 1;
-		    }
-#endif /* LESSTIF_VERSION */
-		
-		  if (event.xcrossing.focus || from_menu_bar_p)
+		  if (event.xcrossing.focus)
 		    x_mouse_leave (dpyinfo);
 		  else
 		    {