aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-06-11 12:01:01 +0000
committerPo Lu2022-06-11 12:01:22 +0000
commit36758096961930baaf0e271522abfb78ff7f656d (patch)
tree5718ae6aa4f91a8c76f2d0f8734dba28b0436343
parentab63000b6add129f270bb7787abc75efefa76ffe (diff)
downloademacs-36758096961930baaf0e271522abfb78ff7f656d.tar.gz
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.
-rw-r--r--lisp/term/haiku-win.el2
-rw-r--r--src/haikuselect.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el
index f99d332bd2b..5443904a733 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."
316 ((posn-area (event-start event))) 316 ((posn-area (event-start event)))
317 ((assoc "refs" string) 317 ((assoc "refs" string)
318 (with-selected-window window 318 (with-selected-window window
319 (raise-frame)
320 (dolist (filename (cddr (assoc "refs" string))) 319 (dolist (filename (cddr (assoc "refs" string)))
321 (dnd-handle-one-url window 'private 320 (dnd-handle-one-url window 'private
322 (concat "file:" filename))))) 321 (concat "file:" filename)))))
@@ -327,7 +326,6 @@ or a pair of markers) and turns it into a file system reference."
327 (dnd-handle-one-url window 'private bf))))) 326 (dnd-handle-one-url window 'private bf)))))
328 ((assoc "text/plain" string) 327 ((assoc "text/plain" string)
329 (with-selected-window window 328 (with-selected-window window
330 (raise-frame)
331 (dolist (text (cddr (assoc "text/plain" string))) 329 (dolist (text (cddr (assoc "text/plain" string)))
332 (unless mouse-yank-at-point 330 (unless mouse-yank-at-point
333 (goto-char (posn-point (event-start event)))) 331 (goto-char (posn-point (event-start event))))
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)
755{ 755{
756 haiku_dnd_frame = NULL; 756 haiku_dnd_frame = NULL;
757 BMessage_delete (message); 757 BMessage_delete (message);
758
759 if (haiku_dnd_follow_tooltip)
760 Fx_hide_tip ();
761} 758}
762 759
763DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message, 760DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message,
@@ -826,11 +823,17 @@ currently being displayed to move along with the mouse pointer. */)
826 process_pending_signals, 823 process_pending_signals,
827 haiku_should_quit_drag); 824 haiku_should_quit_drag);
828 825
829 FRAME_DISPLAY_INFO (f)->grabbed = 0; 826 /* Don't clear the mouse grab if the user decided to quit instead
830 827 of the drop finishing. */
831 if (rc) 828 if (rc)
832 quit (); 829 quit ();
833 830
831 /* Now dismiss the tooltip, since the drop presumably succeeded. */
832 if (!NILP (follow_tooltip))
833 Fx_hide_tip ();
834
835 FRAME_DISPLAY_INFO (f)->grabbed = 0;
836
834 return unbind_to (idx, Qnil); 837 return unbind_to (idx, Qnil);
835} 838}
836 839