summaryrefslogtreecommitdiff
path: root/src/haikuselect.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-03-25 13:41:30 +0000
committerPo Lu <luangruo@yahoo.com>2022-03-25 13:41:30 +0000
commit4dfd42014b50aadd82b425747fe65fa97df28caa (patch)
tree083cd4a906024025b336b2c2c53323a7e764de67 /src/haikuselect.c
parent8ba0f190642d20e8f9caa7472c12674c7ba65a69 (diff)
downloademacs-4dfd42014b50aadd82b425747fe65fa97df28caa.tar.gz
Implement new drag and drop parameter on Haiku
* lisp/term/haiku-win.el (x-begin-drag): Implement `allow-current-frame'. * src/haiku_support.cc (be_drag_message): New argument `allow_same_view'. * src/haiku_support.h: Update prototypes. * src/haikuselect.c (Fhaiku_drag_message): New parameter `allow-same-frame'.
Diffstat (limited to 'src/haikuselect.c')
-rw-r--r--src/haikuselect.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/haikuselect.c b/src/haikuselect.c
index 5540f467c0d..f1aa4f20d96 100644
--- a/src/haikuselect.c
+++ b/src/haikuselect.c
@@ -585,7 +585,7 @@ haiku_should_quit_drag (void)
}
DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message,
- 2, 2, 0,
+ 2, 3, 0,
doc: /* Begin dragging MESSAGE from FRAME.
MESSAGE an alist of strings, denoting message field names, to a list
@@ -606,8 +606,11 @@ associates to a 32-bit unsigned integer describing the type of the
system message.
FRAME is a window system frame that must be visible, from which the
-drag will originate. */)
- (Lisp_Object frame, Lisp_Object message)
+drag will originate.
+
+ALLOW-SAME-FRAME, if nil or not specified, means that MESSAGE will be
+ignored if it is dropped on top of FRAME. */)
+ (Lisp_Object frame, Lisp_Object message, Lisp_Object allow_same_frame)
{
specpdl_ref idx;
void *be_message;
@@ -625,6 +628,7 @@ drag will originate. */)
record_unwind_protect_ptr (BMessage_delete, be_message);
haiku_lisp_to_message (message, be_message);
rc = be_drag_message (FRAME_HAIKU_VIEW (f), be_message,
+ !NILP (allow_same_frame),
block_input, unblock_input,
process_pending_signals,
haiku_should_quit_drag);