]> git.eshelyaron.com Git - emacs.git/commit
Implement Motif drop protocol
authorPo Lu <luangruo@yahoo.com>
Thu, 31 Mar 2022 09:21:37 +0000 (17:21 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 31 Mar 2022 09:21:37 +0000 (17:21 +0800)
commit1d4306a8a770cb73db3b39301ee41e15f9e3656f
treeb40831da1ca6a8aaf016e2d4e1c556d4ff22dfc9
parent6f973faa912a5ac1ba643c6f5deb0c02baa0ba6d
Implement Motif drop protocol

This is the second most widely implemented drag-and-drop
protocol on X Windows, but seems to have some unsolvable
problems (i.e. stuff will keep accumulating in the drag window
as long the target lists keep changing.)  The implementation is
not yet complete and doesn't work with some programs.

* lisp/select.el (xselect-convert-xm-special): New functions.
(selection-converter-alist): Add new converters.
* lisp/x-dnd.el (x-dnd-handle-motif): Ignore messages sent by
the receiver.
* src/xterm.c (xm_targets_table_byte_order): New enum;
(SWAPCARD32, SWAPCARD16): New macros.
(xm_targets_table_rec, xm_drop_start_message)
(xm_drag_initiator_info, xm_drag_receiver_info): New structures.
(XM_DRAG_SIDE_EFFECT, xm_read_targets_table_header)
(xm_read_targets_table_rec, xm_find_targets_table_idx)
(x_atoms_compare, xm_write_targets_table)
(xm_write_drag_initiator_info, xm_get_drag_window)
(xm_setup_dnd_targets, xm_send_drop_message)
(xm_read_drag_receiver_info): New functions.
(x_dnd_compute_toplevels): Correctly free some temp data.
(x_dnd_get_window_proxy, x_dnd_get_window_proto)
(x_set_frame_alpha): Likewise.
(handle_one_xevent): If the window has no XDND proto but has
motif drag receiver data, send a motif drop protocol request.
(x_term_init): New atoms for Motif DND support.
* src/xterm.h (struct x_display_info): Add new atoms.
lisp/select.el
lisp/x-dnd.el
src/xterm.c
src/xterm.h