Subject: Re: bug#38213: 27.0.50; add tooltip move-frame handling to mouse-avoidance-mode

From: martin rudalics <[email-masked]>
Date: Fri, 15 Nov 2019 17:35:42 +0100

> But the normal frame which hosts the tooltip is not moved in this
 > scenario.  To reproduce, turn on mouse-avoidance-mode (I used 'jump'
 > as the avoidance technique), then start Dired, and move the mouse to
 > the file name under cursor.  Here, the tooltip appears and immediately
 > disappears, and I see no movement of the "hosting" frame anywhere.

Hmm...  So you think that something like the attached should be
applied?

martin
diff --git a/src/w32term.c b/src/w32term.c
index d0537c67e9..17bf408c20 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5314,7 +5314,8 @@ w32_read_socket (struct terminal *terminal,
 	case WM_MOVE:
 	  f = w32_window_to_frame (dpyinfo, msg.msg.hwnd);
 
-	  if (f && FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P(f))
+	  if (f && FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P(f)
+	      && !FRAME_TOOLTIP_P (f))
 	    {
 	      w32_real_positions (f, &f->left_pos, &f->top_pos);
 	      inev.kind = MOVE_FRAME_EVENT;
diff --git a/src/xterm.c b/src/xterm.c
index f7005804f0..d55bc3890d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9032,7 +9032,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 		  unblock_input ();
 		}
 
-	      if (old_left != f->left_pos || old_top != f->top_pos)
+	      if (!FRAME_TOOLTIP_P (f)
+		  && (old_left != f->left_pos || old_top != f->top_pos))
 		{
 		  inev.ie.kind = MOVE_FRAME_EVENT;
 		  XSETFRAME (inev.ie.frame_or_window, f);