mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Better reproduce mouse event coalescence during touch event translation
* lisp/touch-screen.el (touch-screen-handle-touch): Save the confines of the current mouse glyph before initiating simple translation.
This commit is contained in:
parent
cc6324d9dc
commit
f521235656
1 changed files with 20 additions and 2 deletions
|
|
@ -1728,7 +1728,25 @@ functions undertaking event management themselves to call
|
||||||
;; `mouse-1-menu' instead and wait for the up
|
;; `mouse-1-menu' instead and wait for the up
|
||||||
;; event to display the menu.
|
;; event to display the menu.
|
||||||
(setcar (nthcdr 3 tool-list) 'mouse-1-menu)
|
(setcar (nthcdr 3 tool-list) 'mouse-1-menu)
|
||||||
(progn (setcar (nthcdr 3 tool-list) 'mouse-drag)
|
(progn
|
||||||
|
(setcar (nthcdr 3 tool-list) 'mouse-drag)
|
||||||
|
;; Record the extents of the glyph beneath this
|
||||||
|
;; touch point to avoid generating extraneous events
|
||||||
|
;; when it next moves.
|
||||||
|
(setcar
|
||||||
|
(nthcdr 5 touch-screen-current-tool)
|
||||||
|
(let* ((edges (window-inside-pixel-edges window))
|
||||||
|
(point (posn-x-y position))
|
||||||
|
(frame-offsets (if (framep window)
|
||||||
|
'(0 . 0)
|
||||||
|
(cons (car edges)
|
||||||
|
(cadr edges)))))
|
||||||
|
(remember-mouse-glyph (or (and (framep window) window)
|
||||||
|
(window-frame window))
|
||||||
|
(+ (car point)
|
||||||
|
(car frame-offsets))
|
||||||
|
(+ (cdr point)
|
||||||
|
(cdr frame-offsets)))))
|
||||||
(throw 'input-event (list 'down-mouse-1 position))))
|
(throw 'input-event (list 'down-mouse-1 position))))
|
||||||
(and point
|
(and point
|
||||||
;; Start the long-press timer.
|
;; Start the long-press timer.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue