New command line switch "--no-terminal-data-request"
This commit is contained in:
parent
ff6ff14793
commit
e5902a6ee6
|
@ -1,3 +1,7 @@
|
||||||
|
2020-02-25 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* New command line switch "--no-terminal-data-request" to disable
|
||||||
|
font and title determination
|
||||||
|
|
||||||
2020-02-19 Markus Gans <guru.mail@muenster.de>
|
2020-02-19 Markus Gans <guru.mail@muenster.de>
|
||||||
* Some small code improvements
|
* Some small code improvements
|
||||||
* SGRoptimizer improved
|
* SGRoptimizer improved
|
||||||
|
|
|
@ -306,41 +306,43 @@ void FApplication::showParameterUsage()
|
||||||
{
|
{
|
||||||
std::cout \
|
std::cout \
|
||||||
<< "Generic options:\n"
|
<< "Generic options:\n"
|
||||||
<< " -h, --help "
|
<< " -h, --help "
|
||||||
<< " Display this help and exit\n"
|
<< " Display this help and exit\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "The Final Cut options:\n"
|
<< "The Final Cut options:\n"
|
||||||
<< " --encoding <name> "
|
<< " --encoding <name> "
|
||||||
<< " Sets the character encoding mode\n"
|
<< " Sets the character encoding mode\n"
|
||||||
<< " "
|
<< " "
|
||||||
<< " {utf8, vt100, pc, ascii}\n"
|
<< " {utf8, vt100, pc, ascii}\n"
|
||||||
<< " --no-mouse "
|
<< " --no-mouse "
|
||||||
<< " Disable mouse support\n"
|
<< " Disable mouse support\n"
|
||||||
<< " --no-optimized-cursor "
|
<< " --no-optimized-cursor "
|
||||||
<< " Disable cursor optimization\n"
|
<< " Disable cursor optimization\n"
|
||||||
<< " --no-terminal-detection"
|
<< " --no-terminal-detection "
|
||||||
<< " Disable terminal detection\n"
|
<< " Disable terminal detection\n"
|
||||||
<< " --no-color-change "
|
<< " --no-terminal-data-request"
|
||||||
<< " Do not redefine the color palette\n"
|
<< " Do not determine terminal font and title\n"
|
||||||
<< " --no-sgr-optimizer "
|
<< " --no-color-change "
|
||||||
<< " Do not optimize SGR sequences\n"
|
<< " Do not redefine the color palette\n"
|
||||||
<< " --vgafont "
|
<< " --no-sgr-optimizer "
|
||||||
<< " Set the standard vga 8x16 font\n"
|
<< " Do not optimize SGR sequences\n"
|
||||||
<< " --newfont "
|
<< " --vgafont "
|
||||||
<< " Enables the graphical font\n"
|
<< " Set the standard vga 8x16 font\n"
|
||||||
|
<< " --newfont "
|
||||||
|
<< " Enables the graphical font\n"
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "FreeBSD console options:\n"
|
<< "FreeBSD console options:\n"
|
||||||
<< " --no-esc-for-alt-meta "
|
<< " --no-esc-for-alt-meta "
|
||||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||||
<< " --no-cursorstyle-change"
|
<< " --no-cursorstyle-change "
|
||||||
<< " Do not change the current cursor style\n"
|
<< " Do not change the current cursor style\n"
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "NetBSD/OpenBSD console options:\n"
|
<< "NetBSD/OpenBSD console options:\n"
|
||||||
<< " --no-esc-for-alt-meta "
|
<< " --no-esc-for-alt-meta "
|
||||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
<< std::endl; // newline character + flushes the output stream
|
<< std::endl; // newline character + flushes the output stream
|
||||||
|
@ -414,23 +416,24 @@ void FApplication::cmd_options (const int& argc, char* argv[])
|
||||||
{
|
{
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
{C_STR("encoding"), required_argument, nullptr, 0 },
|
{C_STR("encoding"), required_argument, nullptr, 0 },
|
||||||
{C_STR("no-mouse"), no_argument, nullptr, 0 },
|
{C_STR("no-mouse"), no_argument, nullptr, 0 },
|
||||||
{C_STR("no-optimized-cursor"), no_argument, nullptr, 0 },
|
{C_STR("no-optimized-cursor"), no_argument, nullptr, 0 },
|
||||||
{C_STR("no-terminal-detection"), no_argument, nullptr, 0 },
|
{C_STR("no-terminal-detection"), no_argument, nullptr, 0 },
|
||||||
{C_STR("no-color-change"), no_argument, nullptr, 0 },
|
{C_STR("no-terminal-data-request"), no_argument, nullptr, 0 },
|
||||||
{C_STR("no-sgr-optimizer"), no_argument, nullptr, 0 },
|
{C_STR("no-color-change"), no_argument, nullptr, 0 },
|
||||||
{C_STR("vgafont"), no_argument, nullptr, 0 },
|
{C_STR("no-sgr-optimizer"), no_argument, nullptr, 0 },
|
||||||
{C_STR("newfont"), no_argument, nullptr, 0 },
|
{C_STR("vgafont"), no_argument, nullptr, 0 },
|
||||||
|
{C_STR("newfont"), no_argument, nullptr, 0 },
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
||||||
{C_STR("no-cursorstyle-change"), no_argument, nullptr, 0 },
|
{C_STR("no-cursorstyle-change"), no_argument, nullptr, 0 },
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{nullptr, 0, nullptr, 0 }
|
{nullptr, 0, nullptr, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
opterr = 0;
|
opterr = 0;
|
||||||
|
@ -471,6 +474,9 @@ void FApplication::cmd_options (const int& argc, char* argv[])
|
||||||
if ( std::strcmp(long_options[idx].name, "no-terminal-detection") == 0 )
|
if ( std::strcmp(long_options[idx].name, "no-terminal-detection") == 0 )
|
||||||
getStartOptions().terminal_detection = false;
|
getStartOptions().terminal_detection = false;
|
||||||
|
|
||||||
|
if ( std::strcmp(long_options[idx].name, "no-terminal-data-request") == 0 )
|
||||||
|
getStartOptions().terminal_data_request = false;
|
||||||
|
|
||||||
if ( std::strcmp(long_options[idx].name, "no-color-change") == 0 )
|
if ( std::strcmp(long_options[idx].name, "no-color-change") == 0 )
|
||||||
getStartOptions().color_change = false;
|
getStartOptions().color_change = false;
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ FStartOptions::FStartOptions()
|
||||||
: cursor_optimisation{true}
|
: cursor_optimisation{true}
|
||||||
, mouse_support{true}
|
, mouse_support{true}
|
||||||
, terminal_detection{true}
|
, terminal_detection{true}
|
||||||
|
, terminal_data_request{true}
|
||||||
, color_change{true}
|
, color_change{true}
|
||||||
, sgr_optimizer{true}
|
, sgr_optimizer{true}
|
||||||
, vgafont{false}
|
, vgafont{false}
|
||||||
|
|
|
@ -1846,6 +1846,9 @@ void FTerm::init_captureFontAndTitle()
|
||||||
{
|
{
|
||||||
// Save the used xterm font and window title
|
// Save the used xterm font and window title
|
||||||
|
|
||||||
|
if ( ! FStartOptions::getFStartOptions().terminal_data_request )
|
||||||
|
return;
|
||||||
|
|
||||||
xterm->captureFontAndTitle();
|
xterm->captureFontAndTitle();
|
||||||
const auto& font = xterm->getFont();
|
const auto& font = xterm->getFont();
|
||||||
const auto& title = xterm->getTitle();
|
const auto& title = xterm->getTitle();
|
||||||
|
|
|
@ -74,23 +74,23 @@ class FStartOptions final
|
||||||
static void destroyObject();
|
static void destroyObject();
|
||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
uInt8 cursor_optimisation : 1;
|
uInt8 cursor_optimisation : 1;
|
||||||
uInt8 mouse_support : 1;
|
uInt8 mouse_support : 1;
|
||||||
uInt8 terminal_detection : 1;
|
uInt8 terminal_detection : 1;
|
||||||
uInt8 color_change : 1;
|
uInt8 terminal_data_request : 1;
|
||||||
uInt8 sgr_optimizer : 1;
|
uInt8 color_change : 1;
|
||||||
uInt8 vgafont : 1;
|
uInt8 sgr_optimizer : 1;
|
||||||
uInt8 newfont : 1;
|
uInt8 vgafont : 1;
|
||||||
uInt8 : 1; // padding bits
|
uInt8 newfont : 1;
|
||||||
fc::encoding encoding;
|
fc::encoding encoding;
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||||
uInt8 meta_sends_escape : 1;
|
uInt8 meta_sends_escape : 1;
|
||||||
uInt8 change_cursorstyle : 1;
|
uInt8 change_cursorstyle : 1;
|
||||||
uInt8 : 6; // padding bits
|
uInt8 : 6; // padding bits
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
uInt8 meta_sends_escape : 1;
|
uInt8 meta_sends_escape : 1;
|
||||||
uInt8 : 7; // padding bits
|
uInt8 : 7; // padding bits
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static FStartOptions* start_options;
|
static FStartOptions* start_options;
|
||||||
|
|
Loading…
Reference in New Issue