[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 3675809696 2/2: Fix some drag-and-drop handling on Haiku
From: |
Po Lu |
Subject: |
master 3675809696 2/2: Fix some drag-and-drop handling on Haiku |
Date: |
Sat, 11 Jun 2022 08:03:02 -0400 (EDT) |
branch: master
commit 36758096961930baaf0e271522abfb78ff7f656d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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.
---
lisp/term/haiku-win.el | 2 --
src/haikuselect.c | 13 ++++++++-----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el
index f99d332bd2..5443904a73 100644
--- a/lisp/term/haiku-win.el
+++ b/lisp/term/haiku-win.el
@@ -316,7 +316,6 @@ or a pair of markers) and turns it into a file system
reference."
((posn-area (event-start event)))
((assoc "refs" string)
(with-selected-window window
- (raise-frame)
(dolist (filename (cddr (assoc "refs" string)))
(dnd-handle-one-url window 'private
(concat "file:" filename)))))
@@ -327,7 +326,6 @@ or a pair of markers) and turns it into a file system
reference."
(dnd-handle-one-url window 'private bf)))))
((assoc "text/plain" string)
(with-selected-window window
- (raise-frame)
(dolist (text (cddr (assoc "text/plain" string)))
(unless mouse-yank-at-point
(goto-char (posn-point (event-start event))))
diff --git a/src/haikuselect.c b/src/haikuselect.c
index b319aace96..8a7b6f2e0b 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);
}