path: root/sys/sys/terminal.h
diff options
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-11-01 17:05:15 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-11-01 17:05:15 +0000
commitda49f6bcc30fd49efe11a3fd228bf94480a1b4b9 (patch)
treede2db3fcc80adf0d399fede8bc0d5457dc4e2075 /sys/sys/terminal.h
parent0677dfd1c4dadb62482e2c72fa4c6720902128a4 (diff)
vt(4): Adjust the cursor position after changing the window size
A new terminal_set_cursor() is added: it wraps the existing teken_set_cursor() function. In vtbuf_grow(), the cursor position is adjusted at the end of the function. In vt_change_font(), we call terminal_set_cursor() just after terminal_set_winsize_blank(), while the terminal is mute. This fixes a bug where, after loading a kernel video driver which increases the terminal window size, the cursor remains at its old position, in other words, in the middle of the display content. PR: 194421 MFC after: 1 week
Notes: svn path=/head/; revision=273932
Diffstat (limited to 'sys/sys/terminal.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/terminal.h b/sys/sys/terminal.h
index 133332f4b944..6528558a8608 100644
--- a/sys/sys/terminal.h
+++ b/sys/sys/terminal.h
@@ -207,6 +207,7 @@ struct terminal {
struct terminal *terminal_alloc(const struct terminal_class *tc, void *softc);
void terminal_maketty(struct terminal *tm, const char *fmt, ...);
+void terminal_set_cursor(struct terminal *tm, const term_pos_t *pos);
void terminal_set_winsize_blank(struct terminal *tm,
const struct winsize *size, int blank, const term_attr_t *attr);
void terminal_set_winsize(struct terminal *tm, const struct winsize *size);