From dd833891dee4a0ad070dca53c257b744b7e4cff1 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Fri, 18 Aug 2017 10:38:49 +0000 Subject: [PATCH] Fix missing syscons escape sequence for setting the border color. --- sys/dev/syscons/scterm-teken.c | 5 +++++ sys/teken/sequences | 1 + sys/teken/teken.h | 1 + sys/teken/teken_subr_compat.h | 7 +++++++ 4 files changed, 14 insertions(+) diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c index d44dd8983c20..ec38eaf280db 100644 --- a/sys/dev/syscons/scterm-teken.c +++ b/sys/dev/syscons/scterm-teken.c @@ -676,6 +676,11 @@ scteken_param(void *arg, int cmd, unsigned int value) scr_stat *scp = arg; switch (cmd) { + case TP_SETBORDER: + scp->border = value & 0xff; + if (scp == scp->sc->cur_scp) + sc_set_border(scp, scp->border); + break; case TP_SHOWCURSOR: if (value) { sc_change_cursor_shape(scp, diff --git a/sys/teken/sequences b/sys/teken/sequences index a8ee5282e8d9..1e4133a5e072 100644 --- a/sys/teken/sequences +++ b/sys/teken/sequences @@ -101,6 +101,7 @@ TBC Tab Clear ^[ [ g r VPA Vertical Position Absolute ^[ [ d n # Cons25 compatibility sequences +C25ADX Cons25 set adapter border ^[ [ = A r C25ADBG Cons25 set adapter background ^[ [ = G r C25ADFG Cons25 set adapter foreground ^[ [ = F r C25BLPD Cons25 set bell pitch duration ^[ [ = B r r diff --git a/sys/teken/teken.h b/sys/teken/teken.h index 7e3716bec55a..e1ea13673554 100644 --- a/sys/teken/teken.h +++ b/sys/teken/teken.h @@ -101,6 +101,7 @@ typedef void tf_param_t(void *, int, unsigned int); #define TP_SETBELLPD_PITCH(pd) ((pd) >> 16) #define TP_SETBELLPD_DURATION(pd) ((pd) & 0xffff) #define TP_MOUSE 6 +#define TP_SETBORDER 7 typedef void tf_respond_t(void *, const void *, size_t); typedef struct { diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h index 22dc126b7ab1..f528be3b4601 100644 --- a/sys/teken/teken_subr_compat.h +++ b/sys/teken/teken_subr_compat.h @@ -26,6 +26,13 @@ * $FreeBSD$ */ +static void +teken_subr_cons25_set_adapter_border(teken_t *t, unsigned int c) +{ + + teken_funcs_param(t, TP_SETBORDER, c); +} + static void teken_subr_cons25_set_cursor_type(teken_t *t, unsigned int type) {