aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-14 17:43:09 +0800
committerPo Lu2022-01-14 17:43:09 +0800
commita970a2a48926d2eca0b767d01c809fbebdc320d7 (patch)
tree2c842028368f2aaf1960a50870848a81d5a02b4e /src
parent53eaec6dc33ad3b44ce4566330c834a47f1e56dd (diff)
downloademacs-a970a2a48926d2eca0b767d01c809fbebdc320d7.tar.gz
emacs-a970a2a48926d2eca0b767d01c809fbebdc320d7.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c3
1 files changed, 1 insertions, 2 deletions
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,
5923 if (!f1 && insist > 0) 5923 if (!f1 && insist > 0)
5924 f1 = SELECTED_FRAME (); 5924 f1 = SELECTED_FRAME ();
5925 5925
5926 if (f1) 5926 if (f1 && FRAME_X_P (f1))
5927 { 5927 {
5928 /* Ok, we found a frame. Store all the values. 5928 /* Ok, we found a frame. Store all the values.
5929 last_mouse_glyph is a rectangle used to reduce the 5929 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,
5933 on it, i.e. into the same rectangles that matrices on 5933 on it, i.e. into the same rectangles that matrices on
5934 the frame are divided into. */ 5934 the frame are divided into. */
5935 5935
5936 /* FIXME: what if F1 is not an X frame? */
5937 dpyinfo = FRAME_DISPLAY_INFO (f1); 5936 dpyinfo = FRAME_DISPLAY_INFO (f1);
5938 remember_mouse_glyph (f1, win_x, win_y, &dpyinfo->last_mouse_glyph); 5937 remember_mouse_glyph (f1, win_x, win_y, &dpyinfo->last_mouse_glyph);
5939 dpyinfo->last_mouse_glyph_frame = f1; 5938 dpyinfo->last_mouse_glyph_frame = f1;