summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-07-01 09:10:34 +0800
committerPo Lu <luangruo@yahoo.com>2022-07-01 09:10:34 +0800
commit833767e53fcb55e3000b54de1cb3803900c363e9 (patch)
treece2833a62cdb6811024becc6b70f198d10fed2eb /src/keyboard.c
parentce00057cb91ba78596f06b674006b452666485a9 (diff)
downloademacs-833767e53fcb55e3000b54de1cb3803900c363e9.tar.gz
Disable middle click selection emulation during XDS
* doc/lispref/frames.texi (Drag and Drop): Document new variable. * lisp/x-dnd.el (x-dnd-do-direct-save): Disable drop emulation during XDS drag-and-drop. * src/keyboard.c (kbd_buffer_get_event): Handle recorded value. * src/xterm.c (x_dnd_do_unsupported_drop): Return if new variable is nil. (x_dnd_send_unsupported_drop): Record value of new variable in events. (x_dnd_begin_drag_and_drop): Handle recorded value. (syms_of_xterm): New variable `x-dnd-use-unsupported-drop'.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8b8d348c41a..4cac20eb4b7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4068,7 +4068,10 @@ kbd_buffer_get_event (KBOARD **kbp,
/* `x-dnd-unsupported-drop-function' could have deleted the
event frame. */
- if (!FRAME_LIVE_P (f))
+ if (!FRAME_LIVE_P (f)
+ /* This means `x-dnd-use-unsupported-drop' was nil when the
+ event was generated. */
+ || NILP (XCAR (XCDR (XCDR (XCDR (event->ie.arg))))))
break;
x_dnd_do_unsupported_drop (FRAME_DISPLAY_INFO (f),