top: turn off the 'Ctrl' bottom window after some keys

To complete the implementation of this new feature, we
must address the problem created by any commands which
offer their own full replacement displays. Should that
'Ctrl' bottom window be active, a return from any such
command leaves that lower portion of a terminal blank.

While we could issue a 'TAGGED_TOSS' macro right after
invoking any of those 4 (currently) affected commands,
it is wrong to make them aware of this 'tagged' stuff.

So, I'll opt for a more generalized solution whereby a
notice regarding a corrupted screen is broadcast. Then
the logic already aware of 'tagging' can deal with it.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2022-05-03 00:00:00 -05:00 committed by Craig Small
parent 16e202d26d
commit d66c1f39b5
2 changed files with 18 additions and 4 deletions

View File

@ -5187,6 +5187,8 @@ static void keys_global (int ch) {
case '?': case '?':
case 'h': case 'h':
help_view(); help_view();
// signal that we just corrupted entire screen
Frames_signal = BREAK_screen;
mkVIZrow1 mkVIZrow1
break; break;
case 'B': case 'B':
@ -5211,6 +5213,8 @@ static void keys_global (int ch) {
break; break;
case 'f': case 'f':
fields_utility(); fields_utility();
// signal that we just corrupted entire screen
Frames_signal = BREAK_screen;
break; break;
case 'g': case 'g':
win_select(0); win_select(0);
@ -5288,12 +5292,18 @@ static void keys_global (int ch) {
pid = get_int(fmtmk(N_fmt(YINSP_pidsee_fmt), def)); pid = get_int(fmtmk(N_fmt(YINSP_pidsee_fmt), def));
if (pid > GET_NUM_ESC) { if (pid > GET_NUM_ESC) {
if (pid == GET_NUM_NOT) pid = def; if (pid == GET_NUM_NOT) pid = def;
if (pid) inspection_utility(pid); if (pid) {
inspection_utility(pid);
// signal that we just corrupted entire screen
Frames_signal = BREAK_screen;
}
} }
} }
break; break;
case 'Z': case 'Z':
wins_colors(); wins_colors();
// signal that we just corrupted entire screen
Frames_signal = BREAK_screen;
mkVIZrow1 mkVIZrow1
break; break;
case '0': case '0':
@ -6240,6 +6250,7 @@ static void do_key (int ch) {
}; };
int i; int i;
Frames_signal = BREAK_off;
switch (ch) { switch (ch) {
case 0: // ignored (always) case 0: // ignored (always)
case kbd_ESC: // ignored (sometimes) case kbd_ESC: // ignored (sometimes)
@ -6255,7 +6266,8 @@ static void do_key (int ch) {
for (i = 0; i < MAXTBL(key_tab); ++i) for (i = 0; i < MAXTBL(key_tab); ++i)
if (strchr(key_tab[i].keys, ch)) { if (strchr(key_tab[i].keys, ch)) {
key_tab[i].func(ch); key_tab[i].func(ch);
Frames_signal = BREAK_kbd; if (Frames_signal == BREAK_off)
Frames_signal = BREAK_kbd;
goto all_done; goto all_done;
} }
}; };
@ -6812,7 +6824,9 @@ static void frame_make (void) {
/* deal with potential signal(s) since the last time around /* deal with potential signal(s) since the last time around
plus any input which may change 'tasks_refresh' needs... */ plus any input which may change 'tasks_refresh' needs... */
if (Frames_signal) { if (Frames_signal) {
if (Frames_signal == BREAK_sig) TAGGED_TOSS; if (Frames_signal == BREAK_sig
|| (Frames_signal == BREAK_screen))
TAGGED_TOSS;
zap_fieldstab(); zap_fieldstab();
} }

View File

@ -229,7 +229,7 @@ enum scale_enum {
/* Used to manipulate (and document) the Frames_signal states */ /* Used to manipulate (and document) the Frames_signal states */
enum resize_states { enum resize_states {
BREAK_off = 0, BREAK_kbd, BREAK_sig, BREAK_autox BREAK_off = 0, BREAK_kbd, BREAK_sig, BREAK_autox, BREAK_screen
}; };
/* This typedef just ensures consistent 'process flags' handling */ /* This typedef just ensures consistent 'process flags' handling */