From: Po Lu Date: Fri, 14 Jan 2022 09:43:09 +0000 (+0800) Subject: Make sure the X mouse position hook always looks at an X frame X-Git-Tag: emacs-29.0.90~3059 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a970a2a48926d2eca0b767d01c809fbebdc320d7;p=emacs.git Make sure the X mouse position hook always looks at an X frame * src/xterm.c (XTmouse_position): Check that f1 is an X frame. --- diff --git a/src/xterm.c b/src/xterm.c index 3a9f5c9ef9f..d17eaf0cccf 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -5923,7 +5923,7 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, if (!f1 && insist > 0) f1 = SELECTED_FRAME (); - if (f1) + if (f1 && FRAME_X_P (f1)) { /* Ok, we found a frame. Store all the values. last_mouse_glyph is a rectangle used to reduce the @@ -5933,7 +5933,6 @@ XTmouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, on it, i.e. into the same rectangles that matrices on the frame are divided into. */ - /* FIXME: what if F1 is not an X frame? */ dpyinfo = FRAME_DISPLAY_INFO (f1); remember_mouse_glyph (f1, win_x, win_y, &dpyinfo->last_mouse_glyph); dpyinfo->last_mouse_glyph_frame = f1;