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>
|
||||
* Some small code improvements
|
||||
* SGRoptimizer improved
|
||||
|
|
|
@ -306,41 +306,43 @@ void FApplication::showParameterUsage()
|
|||
{
|
||||
std::cout \
|
||||
<< "Generic options:\n"
|
||||
<< " -h, --help "
|
||||
<< " Display this help and exit\n"
|
||||
<< " -h, --help "
|
||||
<< " Display this help and exit\n"
|
||||
<< "\n"
|
||||
<< "The Final Cut options:\n"
|
||||
<< " --encoding <name> "
|
||||
<< " Sets the character encoding mode\n"
|
||||
<< " "
|
||||
<< " {utf8, vt100, pc, ascii}\n"
|
||||
<< " --no-mouse "
|
||||
<< " Disable mouse support\n"
|
||||
<< " --no-optimized-cursor "
|
||||
<< " Disable cursor optimization\n"
|
||||
<< " --no-terminal-detection"
|
||||
<< " Disable terminal detection\n"
|
||||
<< " --no-color-change "
|
||||
<< " Do not redefine the color palette\n"
|
||||
<< " --no-sgr-optimizer "
|
||||
<< " Do not optimize SGR sequences\n"
|
||||
<< " --vgafont "
|
||||
<< " Set the standard vga 8x16 font\n"
|
||||
<< " --newfont "
|
||||
<< " Enables the graphical font\n"
|
||||
<< " --encoding <name> "
|
||||
<< " Sets the character encoding mode\n"
|
||||
<< " "
|
||||
<< " {utf8, vt100, pc, ascii}\n"
|
||||
<< " --no-mouse "
|
||||
<< " Disable mouse support\n"
|
||||
<< " --no-optimized-cursor "
|
||||
<< " Disable cursor optimization\n"
|
||||
<< " --no-terminal-detection "
|
||||
<< " Disable terminal detection\n"
|
||||
<< " --no-terminal-data-request"
|
||||
<< " Do not determine terminal font and title\n"
|
||||
<< " --no-color-change "
|
||||
<< " Do not redefine the color palette\n"
|
||||
<< " --no-sgr-optimizer "
|
||||
<< " Do not optimize SGR sequences\n"
|
||||
<< " --vgafont "
|
||||
<< " Set the standard vga 8x16 font\n"
|
||||
<< " --newfont "
|
||||
<< " Enables the graphical font\n"
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
<< "\n"
|
||||
<< "FreeBSD console options:\n"
|
||||
<< " --no-esc-for-alt-meta "
|
||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||
<< " --no-cursorstyle-change"
|
||||
<< " Do not change the current cursor style\n"
|
||||
<< " --no-esc-for-alt-meta "
|
||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||
<< " --no-cursorstyle-change "
|
||||
<< " Do not change the current cursor style\n"
|
||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
<< "\n"
|
||||
<< "NetBSD/OpenBSD console options:\n"
|
||||
<< " --no-esc-for-alt-meta "
|
||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||
<< " --no-esc-for-alt-meta "
|
||||
<< " Do not send a ESC prefix for the alt/meta key\n"
|
||||
#endif
|
||||
|
||||
<< 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[] =
|
||||
{
|
||||
{C_STR("encoding"), required_argument, nullptr, 0 },
|
||||
{C_STR("no-mouse"), 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-color-change"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-sgr-optimizer"), no_argument, nullptr, 0 },
|
||||
{C_STR("vgafont"), no_argument, nullptr, 0 },
|
||||
{C_STR("newfont"), no_argument, nullptr, 0 },
|
||||
{C_STR("encoding"), required_argument, nullptr, 0 },
|
||||
{C_STR("no-mouse"), 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-data-request"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-color-change"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-sgr-optimizer"), no_argument, nullptr, 0 },
|
||||
{C_STR("vgafont"), no_argument, nullptr, 0 },
|
||||
{C_STR("newfont"), no_argument, nullptr, 0 },
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-cursorstyle-change"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-esc-for-alt-meta"), no_argument, nullptr, 0 },
|
||||
{C_STR("no-cursorstyle-change"), no_argument, nullptr, 0 },
|
||||
#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
|
||||
|
||||
{nullptr, 0, nullptr, 0 }
|
||||
{nullptr, 0, nullptr, 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 )
|
||||
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 )
|
||||
getStartOptions().color_change = false;
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ FStartOptions::FStartOptions()
|
|||
: cursor_optimisation{true}
|
||||
, mouse_support{true}
|
||||
, terminal_detection{true}
|
||||
, terminal_data_request{true}
|
||||
, color_change{true}
|
||||
, sgr_optimizer{true}
|
||||
, vgafont{false}
|
||||
|
|
|
@ -1846,6 +1846,9 @@ void FTerm::init_captureFontAndTitle()
|
|||
{
|
||||
// Save the used xterm font and window title
|
||||
|
||||
if ( ! FStartOptions::getFStartOptions().terminal_data_request )
|
||||
return;
|
||||
|
||||
xterm->captureFontAndTitle();
|
||||
const auto& font = xterm->getFont();
|
||||
const auto& title = xterm->getTitle();
|
||||
|
|
|
@ -74,23 +74,23 @@ class FStartOptions final
|
|||
static void destroyObject();
|
||||
|
||||
// Data members
|
||||
uInt8 cursor_optimisation : 1;
|
||||
uInt8 mouse_support : 1;
|
||||
uInt8 terminal_detection : 1;
|
||||
uInt8 color_change : 1;
|
||||
uInt8 sgr_optimizer : 1;
|
||||
uInt8 vgafont : 1;
|
||||
uInt8 newfont : 1;
|
||||
uInt8 : 1; // padding bits
|
||||
uInt8 cursor_optimisation : 1;
|
||||
uInt8 mouse_support : 1;
|
||||
uInt8 terminal_detection : 1;
|
||||
uInt8 terminal_data_request : 1;
|
||||
uInt8 color_change : 1;
|
||||
uInt8 sgr_optimizer : 1;
|
||||
uInt8 vgafont : 1;
|
||||
uInt8 newfont : 1;
|
||||
fc::encoding encoding;
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(UNIT_TEST)
|
||||
uInt8 meta_sends_escape : 1;
|
||||
uInt8 change_cursorstyle : 1;
|
||||
uInt8 : 6; // padding bits
|
||||
uInt8 meta_sends_escape : 1;
|
||||
uInt8 change_cursorstyle : 1;
|
||||
uInt8 : 6; // padding bits
|
||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
uInt8 meta_sends_escape : 1;
|
||||
uInt8 : 7; // padding bits
|
||||
uInt8 meta_sends_escape : 1;
|
||||
uInt8 : 7; // padding bits
|
||||
#endif
|
||||
|
||||
static FStartOptions* start_options;
|
||||
|
|
Loading…
Reference in New Issue