Make precision scrolling on top of the tool bar work
* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Bind some more events. (pixel-scroll-precision): (pixel-scroll-start-momentum): If window is a frame, use its selected window.
This commit is contained in:
parent
54474a6db2
commit
dd71222208
1 changed files with 7 additions and 0 deletions
|
@ -129,6 +129,9 @@ is always with pixel resolution.")
|
|||
(define-key map [vertical-scroll-bar wheel-down] 'pixel-scroll-precision)
|
||||
(define-key map [vertical-scroll-bar wheel-up] 'pixel-scroll-precision)
|
||||
(define-key map [vertical-scroll-bar touch-end] 'pixel-scroll-start-momentum)
|
||||
(define-key map [tool-bar wheel-down] 'pixel-scroll-precision)
|
||||
(define-key map [tool-bar wheel-up] 'pixel-scroll-precision)
|
||||
(define-key map [tool-bar touch-end] 'pixel-scroll-start-momentum)
|
||||
(define-key map [left-margin wheel-down] 'pixel-scroll-precision)
|
||||
(define-key map [left-margin wheel-up] 'pixel-scroll-precision)
|
||||
(define-key map [left-margin touch-end] 'pixel-scroll-start-momentum)
|
||||
|
@ -669,6 +672,8 @@ wheel."
|
|||
(interactive "e")
|
||||
(let ((window (mwheel-event-window event))
|
||||
(current-window (selected-window)))
|
||||
(when (framep window)
|
||||
(setq window (frame-selected-window window)))
|
||||
(if (and (nth 4 event))
|
||||
(let ((delta (round (cdr (nth 4 event)))))
|
||||
(unless (zerop delta)
|
||||
|
@ -742,6 +747,8 @@ It is a vector of the form [ VELOCITY TIME SIGN ]."
|
|||
(when pixel-scroll-precision-use-momentum
|
||||
(let ((window (mwheel-event-window event))
|
||||
(state nil))
|
||||
(when (framep window)
|
||||
(setq window (frame-selected-window window)))
|
||||
(setq state (pixel-scroll-kinetic-state window))
|
||||
(when (and (aref state 1)
|
||||
(listp (aref state 0)))
|
||||
|
|
Loading…
Add table
Reference in a new issue