]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix flickering tooltips with mouse DND without interprogram drag
authorPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 07:46:42 +0000 (15:46 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 07:46:42 +0000 (15:46 +0800)
* src/haikuterm.c (haiku_read_socket):
* src/nsterm.m (ns_mouse_position):
* src/xterm.c (XTmouse_position, handle_one_xevent): Apply
special tooltip treatment to `dropping' as well as
`drag-source'.

src/haikuterm.c
src/nsterm.m
src/xterm.c

index d3a02ff6e5232f7783d997aa08dee88a9a3e3f3a..0a994b7e605ca079c4e4fd3ff52e216d67dce959 100644 (file)
@@ -3290,7 +3290,8 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
                   leave notification events for this.  */
 
                if (any_help_event_p
-                   && !(EQ (track_mouse, Qdrag_source)
+                   && !((EQ (track_mouse, Qdrag_source)
+                         || EQ (track_mouse, Qdropping))
                         && gui_mouse_grabbed (x_display_list)))
                  do_help = -1;
                break;
@@ -3339,7 +3340,8 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
                haiku_new_focus_frame (x_display_list->focused_frame);
 
                if (any_help_event_p
-                   && !(EQ (track_mouse, Qdrag_source)
+                   && !((EQ (track_mouse, Qdrag_source)
+                         || EQ (track_mouse, Qdropping))
                         && gui_mouse_grabbed (x_display_list)))
                  do_help = -1;
              }
index a663aa7379343010fc034b4b62ff4bc4ff7d72d7..9a23efe3ac1eba3ef3e55bc1ad752f591048a3a1 100644 (file)
@@ -2337,7 +2337,8 @@ ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
                         belowWindowWithWindowNumber: window_number];
       w = [NSApp windowWithWindowNumber: window_number];
 
-      if (EQ (track_mouse, Qdrag_source)
+      if (EQ (EQ (track_mouse, Qdrag_source)
+             || EQ (track_mouse, Qdropping))
          && w && [[w delegate] isKindOfClass: [EmacsTooltip class]])
        continue;
 
@@ -2346,7 +2347,8 @@ ns_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
       else if (EQ (track_mouse, Qdrag_source))
        break;
 
-      if (f && EQ (track_mouse, Qdrag_source)
+      if (f && (EQ (track_mouse, Qdrag_source)
+               || EQ (track_mouse, Qdropping))
          && FRAME_TOOLTIP_P (f))
        continue;
     }
index cd6b6af58fe9c1269117daac706857574785e5eb..f280fea4cb903b3569b53cd38d1a278b6ffba1b1 100644 (file)
@@ -11715,7 +11715,9 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
 
                /* If CHILD is a tooltip frame, look below it if
                   track-mouse is drag-source.  */
-               if (child != None)
+               if (child != None
+                   && (EQ (track_mouse, Qdrag_source)
+                       || EQ (track_mouse, Qdropping)))
                  {
                    maybe_tooltip = x_any_window_to_frame (dpyinfo, child);
 
@@ -16822,7 +16824,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              /* But never if `mouse-drag-and-drop-region' is in
                 progress, since that results in the tooltip being
                 dismissed when the mouse moves on top.  */
-             && !(EQ (track_mouse, Qdrag_source)
+             && !((EQ (track_mouse, Qdrag_source)
+                   || EQ (track_mouse, Qdropping))
                   && gui_mouse_grabbed (dpyinfo)))
            do_help = -1;
         }
@@ -18163,7 +18166,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                         in progress, since that results in the
                         tooltip being dismissed when the mouse moves
                         on top.  */
-                     && !(EQ (track_mouse, Qdrag_source)
+                     && !((EQ (track_mouse, Qdrag_source)
+                           || EQ (track_mouse, Qdropping))
                           && gui_mouse_grabbed (dpyinfo)))
                    do_help = -1;
                }