summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-06 05:54:31 +0000
committerPo Lu <luangruo@yahoo.com>2022-04-06 05:54:31 +0000
commit78ecd67888566167fb4c881d8350f611fa039649 (patch)
tree7a53184f780c47732c3782c0f69fcc8e8c7420a4 /src/frame.c
parenta6f7d0f4e38555080bbdb45dbb414e15d206f548 (diff)
downloademacs-78ecd67888566167fb4c881d8350f611fa039649.tar.gz
emacs-78ecd67888566167fb4c881d8350f611fa039649.tar.bz2
emacs-78ecd67888566167fb4c881d8350f611fa039649.zip
Improve safety of haiku-drag-message
* lisp/term/haiku-win.el (haiku-drag-and-drop): Ignore placeholder message. * src/frame.c (delete_frame): Prevent deleting drop source frame on Haiku. * src/haiku_support.cc (RELEASE_NOW, CANCEL_DROP): New message types. (class EmacsView, MessageReceived): Handle new message types. (be_drag_message): Drag CANCEL_DROP message on quit; also send RELEASE_NOW to view if quitting. * src/haikuselect.c (syms_of_haikuselect) (haiku_unwind_drag_message): Clear new frame variable. (Fhaiku_drag_message): Set new frame variable. * src/haikuterm.h: Update prototypes.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 05b22ac72ba..93028aa8958 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1991,6 +1991,10 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
else if (x_dnd_in_progress && f == x_dnd_frame)
error ("Attempt to delete the drop source frame");
#endif
+#ifdef HAVE_HAIKU
+ else if (f == haiku_dnd_frame)
+ error ("Attempt to delete the drop source frame");
+#endif
XSETFRAME (frame, f);