summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-03-16 11:29:36 +0800
committerPo Lu <luangruo@yahoo.com>2022-03-16 11:31:29 +0800
commite53fba3fd4916029662e6619aba713d7dd7c7038 (patch)
treee2cb2a6e92a91c2903b34c4748eca78a634d548b /etc
parentbf7d66aa1aa165bedbab33075820d25f405fcad5 (diff)
downloademacs-e53fba3fd4916029662e6619aba713d7dd7c7038.tar.gz
Add support for dragging text from Emacs to other programs
This still probably needs some more protection from malfunctioning clients which delete windows at random, but I don't know if that's a problem in practice. * doc/emacs/frames.texi (Drag and Drop): * doc/lispref/frames.texi (Drag and Drop): Document new features. * etc/NEWS: Announce new function `x-begin-drag' and new user option `mouse-drag-and-drop-region-cross-program'. * lisp/mouse.el (mouse-drag-and-drop-region-cross-program): New user option. (x-begin-drag): New variable declaration. (mouse-drag-and-drop-region): If the mouse moves out of an Emacs frame, begin a window system drag. * lisp/x-dnd.el (x-dnd-handle-xdnd): Remove left-over debugging code. * src/xfns.c (Fx_set_mouse_absolute_pixel_position): Fix indentation of opening paren. (Fx_begin_drag): New function. (syms_of_xfns): Define new subr. * src/xselect.c (x_timestamp_for_selection): New function. * src/xterm.c (X_DND_SUPPORTED_VERSION): New preprocessor declaration. (x_dnd_get_window_proto, x_dnd_send_enter, x_dnd_send_position) (x_dnd_send_leave, x_dnd_send_drop, x_set_dnd_targets) (x_dnd_begin_drag_and_drop): New functions. (handle_one_xevent): Handle drag-and-drop motion and button events when active. (x_free_frame_resources): If f is the DND source, stop drag-and-drop. (x_term_init): Intern new atoms. (syms_of_xterm): New symbol QXdndSelection. * src/xterm.h (struct x_display_info): New atoms Xatom_XdndAware, Xatom_XdndSelection, Xatom_XdndTypeList, Xatom_XdndActionCopy, Xatom_XdndActionMove, Xatom_XdndActionLink, Xatom_XdndActionAsk, Xatom_XdndActionPrivate, Xatom_XdndActionList, Xatom_XdndActionDescription, Xatom_XdndProxy, Xatom_XdndEnter, Xatom_XdndPosition, Xatom_XdndStatus, Xatom_XdndLeave, Xatom_XdndDrop, and Xatom_XdndFinished.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS10
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index d6b5da3902e..f4d8756950b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -170,6 +170,11 @@ methods instead.
* Changes in Emacs 29.1
+++
+** New user option 'mouse-drag-and-drop-region-cross-program'.
+If non-nil, this option allows dragging text in the region from Emacs
+to another program.
+
++++
** New function 'command-query'.
This function makes its argument command prompt the user for
confirmation before executing.
@@ -1203,6 +1208,11 @@ functions.
* Lisp Changes in Emacs 29.1
++++
+** New function 'x-begin-drag'.
+This function initiates a drag-and-drop request with the contents of
+the selection 'XdndSelection', and returns when a drop occurs.
+
---
** New function 'ietf-drums-parse-date-string'.
This function parses RFC5322 (and RFC822) date strings, and should be