aboutsummaryrefslogtreecommitdiffstats
path: root/ScreenManager.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-02-04 11:23:04 +0100
committerDaniel Lange <DLange@git.local>2022-02-04 11:23:04 +0100
commit93c96b12c9cb349b762d38d69568d65cd3e4fbfd (patch)
tree9cb12bb8f6c16c23cbb19df65c2334449693187d /ScreenManager.c
parentebf0c067a1fdd4b4779b9557552c2278755dcab4 (diff)
parenta6822e98434cf7da6fab033898094976d881ee0f (diff)
downloaddebian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.tar.gz
debian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.tar.bz2
debian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.zip
Update upstream source from tag 'upstream/3.1.2'
Update to upstream version '3.1.2' with Debian dir 5ce130e9471b77941bbd217b5ea8b7b3419a91c6
Diffstat (limited to 'ScreenManager.c')
-rw-r--r--ScreenManager.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ScreenManager.c b/ScreenManager.c
index 54dec64..96e9c47 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -88,7 +88,7 @@ void ScreenManager_resize(ScreenManager* this) {
Panel_move(panel, lastX, y1_header);
}
-static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTimeout, bool* redraw, bool* rescan, bool* timedOut) {
+static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTimeout, bool* redraw, bool* rescan, bool* timedOut, bool *force_redraw) {
ProcessList* pl = this->header->pl;
Platform_gettime_realtime(&pl->realtime, &pl->realtimeMs);
@@ -103,6 +103,7 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi
if (*rescan) {
*oldTime = newTime;
+ int oldUidDigits = Process_uidDigits;
// 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
@@ -111,6 +112,10 @@ static void checkRecalculation(ScreenManager* this, double* oldTime, int* sortTi
ProcessList_sort(pl);
*sortTimeout = 1;
}
+ // force redraw if the number of UID digits was changed
+ if (Process_uidDigits != oldUidDigits) {
+ *force_redraw = true;
+ }
*redraw = true;
}
if (*redraw) {
@@ -153,7 +158,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
while (!quit) {
if (this->header) {
- checkRecalculation(this, &oldTime, &sortTimeout, &redraw, &rescan, &timedOut);
+ checkRecalculation(this, &oldTime, &sortTimeout, &redraw, &rescan, &timedOut, &force_redraw);
}
if (redraw || force_redraw) {

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