diff options
| author | Po Lu | 2025-02-27 09:53:41 +0800 |
|---|---|---|
| committer | Po Lu | 2025-02-27 18:18:58 +0800 |
| commit | a4a458ffa4aaeb988ff4b6e6087c44dfdaf40a0b (patch) | |
| tree | 6325d0821ee1d21873de9f20877d4d1c93c33f1c /src/pgtkfns.c | |
| parent | 85a9b916db126add5a5e2bf4b2b9531ab998cad4 (diff) | |
| download | emacs-a4a458ffa4aaeb988ff4b6e6087c44dfdaf40a0b.tar.gz emacs-a4a458ffa4aaeb988ff4b6e6087c44dfdaf40a0b.zip | |
Fix drag-and-drop treatment of reused tooltip frames
* src/androidfns.c (Fx_show_tip): Set `tip_window' to that of
any reused tooltip frame.
* src/haikufns.c (unwind_create_frame): Return whether the frame
was destroyed, as on X.
(unwind_create_tip_frame, haiku_create_frame, Fx_show_tip):
Synchronize with X.
(do_unwind_create_frame): New function.
(tip_window): Remove unused variable.
* src/nsfns.m (tip_window, unwind_create_tip_frame): Remove
unused variable `tip_window'.
* src/pgtkfns.c (pgtk_create_tip_frame): Rename to
pgtk_create_tip_frame.
(Fx_show_tip): Adjust accordingly. Set `tip_window' to that of
any reused tooltip frame.
* src/w32fns.c (Fx_show_tip):
* src/xfns.c (Fx_show_tip): Set `tip_window' to that of any
reused tooltip frame.
Diffstat (limited to 'src/pgtkfns.c')
| -rw-r--r-- | src/pgtkfns.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 73cd6e5695d..6231ef1cb48 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c | |||
| @@ -2646,7 +2646,7 @@ unwind_create_tip_frame (Lisp_Object frame) | |||
| 2646 | when this happens. */ | 2646 | when this happens. */ |
| 2647 | 2647 | ||
| 2648 | static Lisp_Object | 2648 | static Lisp_Object |
| 2649 | x_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, struct frame *p) | 2649 | pgtk_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, struct frame *p) |
| 2650 | { | 2650 | { |
| 2651 | struct frame *f; | 2651 | struct frame *f; |
| 2652 | Lisp_Object frame; | 2652 | Lisp_Object frame; |
| @@ -3264,10 +3264,13 @@ Text larger than the specified size is clipped. */) | |||
| 3264 | 3264 | ||
| 3265 | /* Create a frame for the tooltip, and record it in the global | 3265 | /* Create a frame for the tooltip, and record it in the global |
| 3266 | variable tip_frame. */ | 3266 | variable tip_frame. */ |
| 3267 | if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, f))) | 3267 | if (NILP ((tip_frame = pgtk_create_tip_frame (FRAME_DISPLAY_INFO (f), |
| 3268 | parms, f)))) | ||
| 3268 | /* Creating the tip frame failed. */ | 3269 | /* Creating the tip frame failed. */ |
| 3269 | return unbind_to (count, Qnil); | 3270 | return unbind_to (count, Qnil); |
| 3270 | } | 3271 | } |
| 3272 | else | ||
| 3273 | tip_window = FRAME_X_WINDOW (XFRAME (tip_frame)); | ||
| 3271 | 3274 | ||
| 3272 | tip_f = XFRAME (tip_frame); | 3275 | tip_f = XFRAME (tip_frame); |
| 3273 | window = FRAME_ROOT_WINDOW (tip_f); | 3276 | window = FRAME_ROOT_WINDOW (tip_f); |