summaryrefslogtreecommitdiffstats
path: root/ScreenManager.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-03-31 13:50:16 +1100
committerBenBE <BenBE@geshi.org>2021-03-31 07:50:45 +0200
commit75fd9edf755572d26da4c745aefae3eb4bb08445 (patch)
tree616cec6cfa81b1cb83d3552edf5641bb8a6d650e /ScreenManager.c
parent8163b8164ff90681cf1400ab540beb8fffdeb60f (diff)
Reorder the header update and process scanning
BenBE points out that some header meters use values calculated during process scanning - make sure we scan processes first in order that current values are displayed. Related to https://github.com/htop-dev/htop/pull/574
Diffstat (limited to 'ScreenManager.c')
-rw-r--r--ScreenManager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ScreenManager.c b/ScreenManager.c
index c4fbfeee..17a76bf3 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -105,9 +105,10 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi
if (*rescan) {
*oldTime = newTime;
+ // scan processes first - some header values are calculated there
+ ProcessList_scan(pl, this->state->pauseProcessUpdate);
// always update header, especially to avoid gaps in graph meters
Header_updateData(this->header);
- ProcessList_scan(pl, this->state->pauseProcessUpdate);
if (!this->state->pauseProcessUpdate && (*sortTimeout == 0 || this->settings->treeView)) {
ProcessList_sort(pl);
*sortTimeout = 1;

© 2014-2024 Faster IT GmbH | imprint | privacy policy