]> granicus.if.org Git - procps-ng/commitdiff
top: allow sticky 'Ctrl' bottom window code by #define
authorJim Warner <james.warner@comcast.net>
Mon, 2 May 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 3 May 2022 09:21:21 +0000 (19:21 +1000)
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 <james.warner@comcast.net>
top/top.c
top/top.h

index a330a775d2a4b6dc2280cdca98558c33e3ec0ef7..f4160b935948f880b31ffac873f39dbd35e730c5 100644 (file)
--- 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
 
 
index a77633557452787438230d3db24631770711f8ca..212d7275576355baed5fd3e03dfb6748768b53b9 100644 (file)
--- 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 */