On 2020-12-01 10:20 am, Eli Zaretskii wrote: >> Date: Mon, 30 Nov 2020 23:10:54 -0800 >> From: Jared Finder >> Cc: Eli Zaretskii , emacs-devel@gnu.org >> >> I found the following two suspect lines that sound related, but it's >> unclear to me what they're for. Does anyone know what functionality >> they enable? (Note: I have some local changes, so my line numbers may >> be slightly off.) >> >> term.c:4253 >> tty->mouse_highlight.mouse_face_window = Qnil; >> >> xdisp.c:20783 >> gui_clear_window_mouse_face (w); > > They are necessary parts of mouse-highlight implementation, and should > be indeed enabled in all builds nowadays. > >> Additionally, it looks like set-mouse-position and >> set-mouse-pixel-position in frame.c does not behave consistently on >> TTYs >> if Emacs is compiled with window system support vs without. > > You mean, if Emacs is compiled with X _and_ with GPM? Otherwise I > don't think I see the issue. Yes that. Also if none of the flags are defined, then Fselect_frame is not called. This is independent of if GPM is enabled or not. Attached is a patch that addresses the above issues. I was able to verify that this make set-mouse-position and set-mouse-pixel-position select frames if HAS_GPM is not defined. I was not able to notice any difference when always setting mouse_face_window. I'd appreciate if someone could test the changes to set-mouse-position on MSDOS and with window systems enabled as I can not test that environment. -- MJF