From: Gerd Möllmann Date: Mon, 24 Feb 2025 04:48:29 +0000 (+0100) Subject: Handle case of not knowing a frame when mouse moved X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b896480984a66f6d87a1e573d130ca38dde4bde;p=emacs.git Handle case of not knowing a frame when mouse moved * lisp/xt-mouse.el (xterm-mouse--handle-mouse-movement): Don't call display--update-for-mouse-movement if we don't have a frame. (cherry picked from commit 02fbdbf4ff628fe4ee6112a57d63a14445726215) --- diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 250f4efebb4..94b3f08de96 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -133,9 +133,11 @@ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)." (defun xterm-mouse--handle-mouse-movement () "Handle mouse motion that was just generated for XTerm mouse." - (display--update-for-mouse-movement (terminal-parameter nil 'xterm-mouse-frame) - (terminal-parameter nil 'xterm-mouse-x) - (terminal-parameter nil 'xterm-mouse-y))) + (when-let* ((frame (terminal-parameter nil 'xterm-mouse-frame))) + (display--update-for-mouse-movement + frame + (terminal-parameter nil 'xterm-mouse-x) + (terminal-parameter nil 'xterm-mouse-y)))) ;; These two variables have been converted to terminal parameters. ;;