mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 08:43:40 -07:00
Handle quitting correctly during interprogram drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Handle quit correctly by exiting the cross program drag and drop.
This commit is contained in:
parent
021dbdb128
commit
8aff4c0a36
1 changed files with 9 additions and 7 deletions
|
|
@ -3119,13 +3119,15 @@ is copied instead of being cut."
|
|||
(mouse-drag-and-drop-region-hide-tooltip)
|
||||
(gui-set-selection 'XdndSelection value-selection)
|
||||
(let ((drag-action-or-frame
|
||||
(x-begin-drag '("UTF8_STRING" "text/plain"
|
||||
"text/plain;charset=utf-8"
|
||||
"STRING" "TEXT" "COMPOUND_TEXT")
|
||||
(if mouse-drag-and-drop-region-cut-when-buffers-differ
|
||||
'XdndActionMove
|
||||
'XdndActionCopy)
|
||||
(posn-window (event-end event)) t)))
|
||||
(condition-case nil
|
||||
(x-begin-drag '("UTF8_STRING" "text/plain"
|
||||
"text/plain;charset=utf-8"
|
||||
"STRING" "TEXT" "COMPOUND_TEXT")
|
||||
(if mouse-drag-and-drop-region-cut-when-buffers-differ
|
||||
'XdndActionMove
|
||||
'XdndActionCopy)
|
||||
(posn-window (event-end event)) t)
|
||||
(quit nil))))
|
||||
(when (framep drag-action-or-frame)
|
||||
(throw 'drag-again nil))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue