summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-07-26 16:12:06 +0800
committerPo Lu <luangruo@yahoo.com>2022-07-26 16:12:06 +0800
commita03d7630f133d08b457a6d08b9ce2050566800ff (patch)
tree040c50ff943743effb462d5faf4baa609b30dfcf
parent2bc6d8283189bcbbf9bceeac5013b9e41a511222 (diff)
downloademacs-a03d7630f133d08b457a6d08b9ce2050566800ff.tar.gz
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.
-rw-r--r--src/haikufns.c1
-rw-r--r--src/nsfns.m1
-rw-r--r--src/xfns.c3
3 files changed, 2 insertions, 3 deletions
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)))
{