move KITTYQUERY to IDQUERIES so as not to bleed through linux virtual console #2050

This commit is contained in:
nick black 2021-08-12 01:20:52 -04:00
parent 7108dc36c0
commit 1681521c57
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -317,10 +317,18 @@ init_terminfo_esc(tinfo* ti, const char* name, escape_e idx,
// Replies with CSI > \d \d ; Pv ; [01] c // Replies with CSI > \d \d ; Pv ; [01] c
#define SECDEVATTR "\x1b[>c" #define SECDEVATTR "\x1b[>c"
// these three queries (terminated with a Primary Device Attributes, to which // query for kitty graphics. if they are supported, we'll get a response to
// this using the kitty response syntax. otherwise, we'll get nothing. we
// send this with the other identification queries, since APCs tend not to
// be consumed by certain terminal emulators (looking at you, Linux console)
// which can be identified directly, sans queries.
#define KITTYQUERY "\x1b_Gi=1,a=q;\x1b\\"
// these queries (terminated with a Primary Device Attributes, to which
// all known terminals reply) hopefully can uniquely and unquestionably // all known terminals reply) hopefully can uniquely and unquestionably
// identify the terminal to which we are talking. // identify the terminal to which we are talking.
#define IDQUERIES TRIDEVATTR \ #define IDQUERIES KITTYQUERY \
TRIDEVATTR \
XTVERSION \ XTVERSION \
XTGETTCAPTN \ XTGETTCAPTN \
SECDEVATTR SECDEVATTR
@ -349,12 +357,7 @@ init_terminfo_esc(tinfo* ti, const char* name, escape_e idx,
// non-standard CSI for total pixel geometry // non-standard CSI for total pixel geometry
#define GEOMPIXEL "\x1b[14t" #define GEOMPIXEL "\x1b[14t"
// query for kitty graphics. if they are supported, we'll get a response to
// this using the kitty response syntax. otherwise, we'll get nothing.
#define KITTYQUERY "\x1b_Gi=1,a=q;\x1b\\"
#define DIRECTIVES CSI_BGQ \ #define DIRECTIVES CSI_BGQ \
KITTYQUERY \
SUMQUERY \ SUMQUERY \
"\x1b[?1;3;256S" /* try to set 256 cregs */ \ "\x1b[?1;3;256S" /* try to set 256 cregs */ \
CREGSXTSM \ CREGSXTSM \