summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAaron Jensen <aaronjensen@gmail.com>2018-05-24 03:45:03 -0700
committerAlan Third <alan@idiocy.org>2018-06-17 11:50:57 +0100
commitebe065fddf76fde64a9c07b419b67fe47fb6c1cb (patch)
tree9bc1e2ed312704df5347bfc707bb3485a71c5552 /lisp
parentffd20184ca9bb026064f28aa260f2298baeb7fc8 (diff)
downloademacs-ebe065fddf76fde64a9c07b419b67fe47fb6c1cb.tar.gz
emacs-ebe065fddf76fde64a9c07b419b67fe47fb6c1cb.tar.bz2
emacs-ebe065fddf76fde64a9c07b419b67fe47fb6c1cb.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mouse.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 9a3e2235ece..5c9056fb43d 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1225,7 +1225,11 @@ The region will be defined with mark and point."
(bounds (window-edges start-window))
(make-cursor-line-fully-visible nil)
(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)
;; Don't count the mode line.
(1- (nth 3 bounds))))