From: Po Lu Date: Tue, 26 Jul 2022 08:12:06 +0000 (+0800) Subject: Fix flicker when moving tooltips between frames during mouse drag-and-drop X-Git-Tag: emacs-29.0.90~1447^2~748 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a03d7630f133d08b457a6d08b9ce2050566800ff;p=emacs.git Fix flicker when moving tooltips between frames during mouse drag-and-drop * src/haikufns.c (Fx_show_tip): * src/nsfns.m (Fx_show_tip): Allow sharing existing tooltip frames between any two frames. * src/xfns.c (Fx_show_tip): Allow that but only between frames on the same X display. --- diff --git a/src/haikufns.c b/src/haikufns.c index 67f79a31669..f3667ac2f9d 100644 --- a/src/haikufns.c +++ b/src/haikufns.c @@ -2405,7 +2405,6 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { if (FRAME_VISIBLE_P (XFRAME (tip_frame)) - && EQ (frame, tip_last_frame) && !NILP (Fequal_including_properties (tip_last_string, string)) && !NILP (Fequal (tip_last_parms, parms))) { diff --git a/src/nsfns.m b/src/nsfns.m index b0b779bd41c..433df059610 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -3292,7 +3292,6 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { if (FRAME_VISIBLE_P (XFRAME (tip_frame)) - && EQ (frame, tip_last_frame) && !NILP (Fequal_including_properties (tip_last_string, string)) && !NILP (Fequal (tip_last_parms, parms))) { diff --git a/src/xfns.c b/src/xfns.c index ce867c1619c..076cd97875a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -8681,7 +8681,8 @@ Text larger than the specified size is clipped. */) if (!NILP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { if (FRAME_VISIBLE_P (XFRAME (tip_frame)) - && BASE_EQ (frame, tip_last_frame) + && (FRAME_X_DISPLAY (XFRAME (frame)) + == FRAME_X_DISPLAY (XFRAME (tip_last_frame))) && !NILP (Fequal_including_properties (tip_last_string, string)) && !NILP (Fequal (tip_last_parms, parms))) {