diff options
| author | Po Lu | 2022-06-09 13:11:08 +0800 |
|---|---|---|
| committer | Po Lu | 2022-06-09 13:11:08 +0800 |
| commit | 2f31dbeadff0abc38ded5dd072df1ec179c49945 (patch) | |
| tree | 5e3a0da965fa681348bb48d045d9d94f8edbaea0 /lisp | |
| parent | 7e41b4aa231ed094613fe0ea12e7ec37a396240f (diff) | |
| download | emacs-2f31dbeadff0abc38ded5dd072df1ec179c49945.tar.gz emacs-2f31dbeadff0abc38ded5dd072df1ec179c49945.zip | |
Also show mouse DND tooltip contents during interprogram drag-and-drop
* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/mouse.el (mouse-drag-and-drop-region): Don't hide tooltip
when initiating interprogram drag-and-drop.
* lisp/term/haiku-win.el (x-begin-drag):
* lisp/term/ns-win.el (x-begin-drag): Add stubs for new
parameter.
* src/xfns.c (Fx_begin_drag): New parameter `follow-tooltip'.
(Fx_show_tip, syms_of_xfns): Add records of the last dx and dy
given to `x-show-tip'.
* src/xterm.c (x_clear_dnd_monitors): New function.
(x_dnd_begin_drag_and_drop): Save monitor attributes list if
appropriate.
(x_dnd_compute_tip_xy, x_dnd_update_tooltip_position): New
function.
(x_dnd_update_state, handle_one_xevent): Update tooltip position
during DND mouse movement.
(syms_of_xterm): Update staticpros.
* src/xterm.h: Update prototypes.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mouse.el | 3 | ||||
| -rw-r--r-- | lisp/term/haiku-win.el | 3 | ||||
| -rw-r--r-- | lisp/term/ns-win.el | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 024a018bb91..6a2b1738f71 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -3244,7 +3244,6 @@ is copied instead of being cut." | |||
| 3244 | (cdr mouse-position))))))) | 3244 | (cdr mouse-position))))))) |
| 3245 | (not (posn-window (event-end event)))))) | 3245 | (not (posn-window (event-end event)))))) |
| 3246 | (setq drag-again-mouse-position nil) | 3246 | (setq drag-again-mouse-position nil) |
| 3247 | (mouse-drag-and-drop-region-hide-tooltip) | ||
| 3248 | (gui-set-selection 'XdndSelection value-selection) | 3247 | (gui-set-selection 'XdndSelection value-selection) |
| 3249 | (let ((drag-action-or-frame | 3248 | (let ((drag-action-or-frame |
| 3250 | (condition-case nil | 3249 | (condition-case nil |
| @@ -3259,7 +3258,7 @@ is copied instead of being cut." | |||
| 3259 | ;; `return-frame' doesn't | 3258 | ;; `return-frame' doesn't |
| 3260 | ;; work, allow dropping on | 3259 | ;; work, allow dropping on |
| 3261 | ;; the drop frame. | 3260 | ;; the drop frame. |
| 3262 | (eq window-system 'haiku)) | 3261 | (eq window-system 'haiku) t) |
| 3263 | (quit nil)))) | 3262 | (quit nil)))) |
| 3264 | (when (framep drag-action-or-frame) | 3263 | (when (framep drag-action-or-frame) |
| 3265 | ;; With some window managers `x-begin-drag' | 3264 | ;; With some window managers `x-begin-drag' |
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index 6ddf546ee57..58217513902 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el | |||
| @@ -366,7 +366,8 @@ take effect on menu items until the menu bar is updated again." | |||
| 366 | 366 | ||
| 367 | (setq haiku-drag-track-function #'haiku-dnd-drag-handler) | 367 | (setq haiku-drag-track-function #'haiku-dnd-drag-handler) |
| 368 | 368 | ||
| 369 | (defun x-begin-drag (targets &optional action frame _return-frame allow-current-frame) | 369 | (defun x-begin-drag (targets &optional action frame _return-frame |
| 370 | allow-current-frame _follow-tooltip) | ||
| 370 | "SKIP: real doc in xfns.c." | 371 | "SKIP: real doc in xfns.c." |
| 371 | (unless haiku-dnd-selection-value | 372 | (unless haiku-dnd-selection-value |
| 372 | (error "No local value for XdndSelection")) | 373 | (error "No local value for XdndSelection")) |
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 2e021b9b29c..0d46a895ce8 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el | |||
| @@ -895,7 +895,8 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") | |||
| 895 | &context (window-system ns)) | 895 | &context (window-system ns)) |
| 896 | (ns-get-selection selection-symbol target-type)) | 896 | (ns-get-selection selection-symbol target-type)) |
| 897 | 897 | ||
| 898 | (defun x-begin-drag (targets &optional action frame return-frame allow-current-frame) | 898 | (defun x-begin-drag (targets &optional action frame return-frame |
| 899 | allow-current-frame _follow-tooltip) | ||
| 899 | "SKIP: real doc in xfns.c." | 900 | "SKIP: real doc in xfns.c." |
| 900 | (unless ns-dnd-selection-value | 901 | (unless ns-dnd-selection-value |
| 901 | (error "No local value for XdndSelection")) | 902 | (error "No local value for XdndSelection")) |