emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 79ae40c8e4: Improve documentation on what callers of `x-begin-dra


From: Po Lu
Subject: master 79ae40c8e4: Improve documentation on what callers of `x-begin-drag' should do
Date: Fri, 27 May 2022 22:32:12 -0400 (EDT)

branch: master
commit 79ae40c8e4dac5898d68c92f26f625ac400b960c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Improve documentation on what callers of `x-begin-drag' should do
    
    * doc/lispref/frames.texi (Drag and Drop):
    * src/xfns.c (Fx_begin_drag): Improve documentation of how the
    chosen action should be performed.
---
 doc/lispref/frames.texi | 4 ++++
 src/xfns.c              | 9 +++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index e87e247496..20e9c17f1f 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -4106,6 +4106,10 @@ is also a valid return value in addition to 
@code{XdndActionCopy} and
 @code{XdndActionMove}; it means that the drop target chose to perform
 an unspecified action, and no further processing is required by the
 caller.
+
+The caller must cooperate with the target to fully perform the action
+chosen by the target.  For example, callers should delete the buffer
+text that was dragged if this function returns @code{XdndActionMove}.
 @end defun
 
 @node Color Names
diff --git a/src/xfns.c b/src/xfns.c
index 60b22ff145..9f218d2b7f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6792,8 +6792,9 @@ buttons are released, then return the action chosen by 
the target, or
 starts when the mouse is pressed on FRAME, and the contents of the
 selection `XdndSelection' will be sent to the X window underneath the
 mouse pointer (the drop target) when the mouse button is released.
-ACTION is a symbol which tells the target what the source will do, and
-can be one of the following:
+
+ACTION is a symbol which tells the target what it should do, and can
+be one of the following:
 
  - `XdndActionCopy', which means to copy the contents from the drag
    source (FRAME) to the drop target.
@@ -6805,6 +6806,10 @@ can be one of the following:
 `XdndActionPrivate' is also a valid return value, and means that the
 drop target chose to perform an unspecified or unknown action.
 
+The source is also expected to cooperate with the target to perform
+the action chosen by the target.  For example, callers should delete
+the buffer text that was dragged if `XdndActionMove' is returned.
+
 There are also some other valid values of ACTION that depend on
 details of both the drop target's implementation details and that of
 Emacs.  For that reason, they are not mentioned here.  Consult



reply via email to

[Prev in Thread] Current Thread [Next in Thread]