diff options
author | Po Lu <luangruo@yahoo.com> | 2022-01-14 17:43:09 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-01-14 17:43:09 +0800 |
commit | a970a2a48926d2eca0b767d01c809fbebdc320d7 (patch) | |
tree | 2c842028368f2aaf1960a50870848a81d5a02b4e | |
parent | 53eaec6dc33ad3b44ce4566330c834a47f1e56dd (diff) | |
download | emacs-a970a2a48926d2eca0b767d01c809fbebdc320d7.tar.gz |
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.
-rw-r--r-- | src/xterm.c | 3 |
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, 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; |