[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 d4e1549: Guard terminal parameter in XTerm mo
Re: [Emacs-diffs] emacs-25 d4e1549: Guard terminal parameter in XTerm mouse mode
Wed, 23 Nov 2016 17:54:23 +0200
> From: Philipp Stephani <address@hidden>
> Date: Wed, 23 Nov 2016 12:20:16 +0000
> Stefan Monnier <address@hidden> schrieb am Mi., 23. Nov. 2016 um 02:08 Uhr:
> > + (setf (terminal-parameter nil 'xterm-mouse-last-down)
> > + ;; EVENT might be handed back to the input queue, which
> > + ;; might modify it. Copy it into the terminal parameter
> > + ;; to guard against that.
> > + (copy-sequence event))
> Do you have further information about when/where events might be
> modified in place? It sounds like a risky operation.
> I assume it's in the code that translates consecutive mouse-down events to
> mouse-movement events. It's
> easy to reproduce in HTerm: without the patch, dragging the mouse while
> holding a button causes
> "drag-mouse-0" events to be generated. These come from spurious
> mouse-movement events in
> xterm-mouse-last-down. Since nothing places these events explicitly there,
> the root cause must be that the
> event list is overwritten.
> Agreed that the input loop probably shouldn't modify event objects. But it
> might be a necessary optimization
> somewhere. Unfortunately I wasn't able to find the specific piece of code
> responsible for this modification.
Does this have to be applied to the release branch? If so, can you