summaryrefslogtreecommitdiff
path: root/src/haikuselect.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-06-11 12:01:01 +0000
committerPo Lu <luangruo@yahoo.com>2022-06-11 12:01:22 +0000
commit36758096961930baaf0e271522abfb78ff7f656d (patch)
tree5718ae6aa4f91a8c76f2d0f8734dba28b0436343 /src/haikuselect.c
parentab63000b6add129f270bb7787abc75efefa76ffe (diff)
downloademacs-36758096961930baaf0e271522abfb78ff7f656d.tar.gz
emacs-36758096961930baaf0e271522abfb78ff7f656d.tar.bz2
emacs-36758096961930baaf0e271522abfb78ff7f656d.zip
Fix some drag-and-drop handling on Haiku
* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't raise frame for some types of drags. * src/haikuselect.c (haiku_unwind_drag_message): Don't hide tooltip here. (Fhaiku_drag_message): Only clear grab and hide tooltip if the drag was successful.
Diffstat (limited to 'src/haikuselect.c')
-rw-r--r--src/haikuselect.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/haikuselect.c b/src/haikuselect.c
index b319aace96c..8a7b6f2e0b1 100644
--- a/src/haikuselect.c
+++ b/src/haikuselect.c
@@ -755,9 +755,6 @@ haiku_unwind_drag_message (void *message)
{
haiku_dnd_frame = NULL;
BMessage_delete (message);
-
- if (haiku_dnd_follow_tooltip)
- Fx_hide_tip ();
}
DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message,
@@ -826,11 +823,17 @@ currently being displayed to move along with the mouse pointer. */)
process_pending_signals,
haiku_should_quit_drag);
- FRAME_DISPLAY_INFO (f)->grabbed = 0;
-
+ /* Don't clear the mouse grab if the user decided to quit instead
+ of the drop finishing. */
if (rc)
quit ();
+ /* Now dismiss the tooltip, since the drop presumably succeeded. */
+ if (!NILP (follow_tooltip))
+ Fx_hide_tip ();
+
+ FRAME_DISPLAY_INFO (f)->grabbed = 0;
+
return unbind_to (idx, Qnil);
}