From 16e202d26d8de2950e6f92bdb4003ddbbd35f4ec Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Mon, 2 May 2022 00:00:00 -0500 Subject: [PATCH] top: allow sticky 'Ctrl' bottom window code by #define After making that new bottom window more persistent, I decided to offer a build choice for somebody who might prefer to have the rug pulled out from under him while reviewing window contents should some target task end. If 'TAGGED_BRIEF' is defined old behavior is restored. [ it should be noted, however, that when this define ] [ is active we'll lose any benefit of onetime update ] [ for the bottom window. just like with the original ] [ behavior, it is repainted with every update cycle. ] Signed-off-by: Jim Warner --- top/top.c | 10 ++++++++++ top/top.h | 1 + 2 files changed, 11 insertions(+) diff --git a/top/top.c b/top/top.c index a330a775..f4160b93 100644 --- a/top/top.c +++ b/top/top.c @@ -4651,8 +4651,13 @@ static void wins_tag_cmdline (void) { putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_clr_eos)); putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_norm)); fputs(p, stdout); +#ifdef TAGGED_BRIEF + } else + TAGGED_TOSS; +#else } TAGGED_KEEP; +#endif } // end: wins_tag_cmdline @@ -4678,8 +4683,13 @@ static void wins_tag_generic (void) { putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_clr_eos)); putp(fmtmk("%s%s", tg2(0, SCREEN_ROWS + 1), Cap_norm)); fputs(p, stdout); +#ifdef TAGGED_BRIEF + } else + TAGGED_TOSS; +#else } TAGGED_KEEP; +#endif } // end: wins_tag_generic diff --git a/top/top.h b/top/top.h index a7763355..212d7275 100644 --- a/top/top.h +++ b/top/top.h @@ -54,6 +54,7 @@ //#define SCROLLVAR_NO /* disable intra-column horizontal scrolls */ //#define SCROLLV_BY_1 /* when scrolling left/right do not move 8 */ //#define STRINGCASENO /* case insenstive compare/locate versions */ +//#define TAGGED_BRIEF /* zap Ctrl bottom window when target dies */ //#define TERMIOS_ONLY /* use native input only (just limp along) */ //#define THREADED_CPU /* separate background thread for cpu updt */ //#define THREADED_MEM /* separate background thread for mem updt */