Prevent errant scroll on mouse click (Bug#31546)
* src/nsterm.m (ns_mouse_position): Use correct frame when determining mouse position. * lisp/mouse.el (mouse-drag-track): Only account for mode-line height if `mode-line-format' is non-nil.
This commit is contained in:
parent
ffd20184ca
commit
ebe065fddf
2 changed files with 6 additions and 2 deletions
|
@ -1225,7 +1225,11 @@ The region will be defined with mark and point."
|
||||||
(bounds (window-edges start-window))
|
(bounds (window-edges start-window))
|
||||||
(make-cursor-line-fully-visible nil)
|
(make-cursor-line-fully-visible nil)
|
||||||
(top (nth 1 bounds))
|
(top (nth 1 bounds))
|
||||||
(bottom (if (window-minibuffer-p start-window)
|
(bottom (if (or (window-minibuffer-p start-window)
|
||||||
|
;; Do not account for the mode line if there
|
||||||
|
;; is no mode line, which is common for child
|
||||||
|
;; frames.
|
||||||
|
(not mode-line-format))
|
||||||
(nth 3 bounds)
|
(nth 3 bounds)
|
||||||
;; Don't count the mode line.
|
;; Don't count the mode line.
|
||||||
(1- (nth 3 bounds))))
|
(1- (nth 3 bounds))))
|
||||||
|
|
|
@ -2547,7 +2547,7 @@ so some key presses (TAB) are swallowed by the system. */
|
||||||
|
|
||||||
if (f && FRAME_NS_P (f))
|
if (f && FRAME_NS_P (f))
|
||||||
{
|
{
|
||||||
view = FRAME_NS_VIEW (*fp);
|
view = FRAME_NS_VIEW (f);
|
||||||
|
|
||||||
position = [[view window] mouseLocationOutsideOfEventStream];
|
position = [[view window] mouseLocationOutsideOfEventStream];
|
||||||
position = [view convertPoint: position fromView: nil];
|
position = [view convertPoint: position fromView: nil];
|
||||||
|
|
Loading…
Add table
Reference in a new issue