]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix workaround for xt-mouse-tests
authorGerd Möllmann <gerd@gnu.org>
Mon, 27 Jan 2025 09:21:08 +0000 (10:21 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:07:48 +0000 (19:07 +0100)
* lisp/xt-mouse.el (xterm-mouse-event): For running this in batch mode,
fix computation of x and y.

(cherry picked from commit 59050c3e8c500e216ec7214195c9441ecb4a031c)

lisp/xt-mouse.el

index e395723d05c6824afdddc56646da3d556f3eccb6..250f4efebb4ad76c9443d1be0baec52643243f4d 100644 (file)
@@ -297,11 +297,12 @@ which is the \"1006\" extension implemented in Xterm >= 277."
                                             1000))))
              ;; FIXME: The test for running in batch mode is here solely
              ;; for the sake of xt-mouse-tests where the only frame is
-             ;; the initial frame.
+             ;; the initial frame.  The same goes for the computation of
+             ;; x and y.
              (frame-and-xy (unless noninteractive (tty-frame-at x y)))
              (frame (nth 0 frame-and-xy))
-             (x (nth 1 frame-and-xy))
-             (y (nth 2 frame-and-xy))
+             (x (or (nth 1 frame-and-xy) x))
+             (y (or (nth 2 frame-and-xy) y))
              (w (window-at x y frame))
              (ltrb (window-edges w))
              (left (nth 0 ltrb))