Compare commits
3 Commits
f7912a8ce7
...
d39c35e59e
Author | SHA1 | Date |
---|---|---|
Přemysl Eric Janouch | d39c35e59e | |
Přemysl Eric Janouch | d47bcfb203 | |
Přemysl Eric Janouch | ff08195973 |
2
LICENSE
2
LICENSE
|
@ -1,5 +1,5 @@
|
|||
Copyright (c) 2007-2014 Paul Evans <leonerd@leonerd.org.uk>
|
||||
Copyright (c) 2014-2020 Přemysl Eric Janouch <p@janouch.name>
|
||||
Copyright (c) 2014-2021 Přemysl Eric Janouch <p@janouch.name>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
11
driver-ti.c
11
driver-ti.c
|
@ -272,7 +272,8 @@ load_terminfo (termo_ti_t *ti, const char *term)
|
|||
if (!have_mouse)
|
||||
ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_NONE;
|
||||
else if (strstr (term, "rxvt") == term)
|
||||
// urxvt generally doesn't understand the SGR protocol.
|
||||
// urxvt didn't understand the SGR protocol until version 9.25,
|
||||
// it's safest to keep using 1015.
|
||||
ti->tk->guessed_mouse_proto = TERMO_MOUSE_PROTO_RXVT;
|
||||
else
|
||||
// SGR (1006) is the superior protocol. If it's not supported by the
|
||||
|
@ -363,6 +364,8 @@ mouse_reset (termo_ti_t *ti)
|
|||
&& write_string (ti->tk, "\x1b[?1002l")
|
||||
&& write_string (ti->tk, "\x1b[?1003l")
|
||||
|
||||
&& write_string (ti->tk, "\x1b[?1004l")
|
||||
|
||||
&& write_string (ti->tk, "\x1b[?1005l")
|
||||
&& write_string (ti->tk, "\x1b[?1006l")
|
||||
&& write_string (ti->tk, "\x1b[?1015l");
|
||||
|
@ -410,8 +413,12 @@ start_driver (termo_t *tk, void *info)
|
|||
// Disable everything mouse-related first
|
||||
if (!mouse_reset (ti))
|
||||
return false;
|
||||
|
||||
// Enable focus tracking opportunistically and automatically,
|
||||
// as it basically doesn't have any negative consequences at all
|
||||
return mouse_set_proto (ti, tk->mouse_proto, true)
|
||||
&& mouse_set_tracking_mode (ti, tk->mouse_tracking, true);
|
||||
&& mouse_set_tracking_mode (ti, tk->mouse_tracking, true)
|
||||
&& write_string (ti->tk, "\x1b[?1004h");
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
4
termo.c
4
termo.c
|
@ -1695,9 +1695,9 @@ termo_strpkey_generic (termo_t *tk, const char *str, termo_key_t *key,
|
|||
|
||||
if (!str
|
||||
|| key->type != TERMO_TYPE_KEY
|
||||
|| key->code.codepoint < '@'
|
||||
|| key->code.codepoint < '@'
|
||||
|| key->code.codepoint > '_'
|
||||
|| key->modifiers != 0)
|
||||
|| key->modifiers != 0)
|
||||
return NULL;
|
||||
|
||||
if (key->code.codepoint >= 'A'
|
||||
|
|
Loading…
Reference in New Issue