Along the way to width override support (-w switch),
this top began clearing the screen far more often
than his predecessor. In fact, it happend with each
user keystroke.
This commit dramatically reduces those occurances.
The screen will now be cleared only when an actual
SIGWINCH is received.
Thanks for identifying this flaw belongs to:
James Cloos, cloos@jhcloos.com
References:
http://www.freelists.org/post/procps/Merge-request
Blame:
c2dcbef4826806f85b7ad6de2d9fe99bc390d603
Author: Jim Warner <james.warner@comcast.net>
Date: Thu May 26 11:33:32 2011 +0200
subject: added output width/height override support to top, + misc
* SIGCONT and SIGWINCH */
static void sig_resize (int dont_care_sig) {
(void)dont_care_sig;
- Frames_resize = 1;
+ Frames_resize = 2;
} // end: sig_resize
\f
/*###### Misc Color/Display support ####################################*/
Pseudo_screen = alloc_r(Pseudo_screen, pseudo_max);
}
PSU_CLREOS(0);
- if (Frames_resize) putp(Cap_clr_scr);
+ if (Frames_resize > 1) putp(Cap_clr_scr);
} // end: adj_geometry