diff options
author | João Távora <joaotavora@gmail.com> | 2021-01-16 14:17:58 -0800 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2021-01-22 14:05:21 +0200 |
commit | 463300d431a56c58ca7f1db9615046143f354a81 (patch) | |
tree | 576ebf6115de5696d2ab1d2292147736fdef2ef8 /src/term.c | |
parent | 6bfc672bc7f467edf39cfba262c5c4f11897d4e0 (diff) | |
download | emacs-463300d431a56c58ca7f1db9615046143f354a81.tar.gz emacs-463300d431a56c58ca7f1db9615046143f354a81.tar.bz2 emacs-463300d431a56c58ca7f1db9615046143f354a81.zip |
Enable TTY mouse-face support when built without GPM support
* src/term.c (tty_write_glyphs_with_face): Move definition out of
ifdef block.
* src/xdisp.c (draw_row_with_mouse_face): Now called
unconditionally on all platforms.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/term.c b/src/term.c index 2e2ab2bf438..37c06a560dd 100644 --- a/src/term.c +++ b/src/term.c @@ -790,8 +790,6 @@ tty_write_glyphs (struct frame *f, struct glyph *string, int len) cmcheckmagic (tty); } -#ifdef HAVE_GPM /* Only used by GPM code. */ - static void tty_write_glyphs_with_face (register struct frame *f, register struct glyph *string, register int len, register int face_id) @@ -847,7 +845,6 @@ tty_write_glyphs_with_face (register struct frame *f, register struct glyph *str cmcheckmagic (tty); } -#endif /* An implementation of insert_glyphs for termcap frames. */ @@ -2380,22 +2377,6 @@ frame's terminal). */) Mouse ***********************************************************************/ -#ifdef HAVE_GPM - -void -term_mouse_moveto (int x, int y) -{ - /* TODO: how to set mouse position? - const char *name; - int fd; - name = (const char *) ttyname (0); - fd = emacs_open (name, O_WRONLY, 0); - SOME_FUNCTION (x, y, fd); - emacs_close (fd); - last_mouse_x = x; - last_mouse_y = y; */ -} - /* Implementation of draw_row_with_mouse_face for TTY/GPM. */ void tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row, @@ -2428,6 +2409,22 @@ tty_draw_row_with_mouse_face (struct window *w, struct glyph_row *row, cursor_to (f, save_y, save_x); } +#ifdef HAVE_GPM + +void +term_mouse_moveto (int x, int y) +{ + /* TODO: how to set mouse position? + const char *name; + int fd; + name = (const char *) ttyname (0); + fd = emacs_open (name, O_WRONLY, 0); + SOME_FUNCTION (x, y, fd); + emacs_close (fd); + last_mouse_x = x; + last_mouse_y = y; */ +} + /* Return the current time, as a Time value. Wrap around on overflow. */ static Time current_Time (void) |