From 698a0cbff05fd41dac3b2fc448ad9c6a5c955025 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Wed, 17 Jan 2024 09:55:13 +0100 Subject: Apply upstream patches, Release 3.3.0-3 * 5d778ea as 002_fix_tree_mode_sorting.patch * 91990b1 as 003_fix_column_header_update.patch --- debian/changelog | 7 ++++++ debian/patches/002_fix_tree_mode_sorting.patch | 26 +++++++++++++++++++++++ debian/patches/003_fix_column_header_update.patch | 23 ++++++++++++++++++++ debian/patches/series | 2 ++ 4 files changed, 58 insertions(+) create mode 100644 debian/patches/002_fix_tree_mode_sorting.patch create mode 100644 debian/patches/003_fix_column_header_update.patch diff --git a/debian/changelog b/debian/changelog index 60815a9..cdf48fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +htop (3.3.0-3) unstable; urgency=medium + + * Apply upstream fix for broken tree mode sorting + * Apply upstream fix for missing sort direction arrow update on mouse click + + -- Daniel Lange Wed, 17 Jan 2024 10:28:00 +0100 + htop (3.3.0-2) unstable; urgency=medium * Apply upstream fix for number of running tasks show as zero diff --git a/debian/patches/002_fix_tree_mode_sorting.patch b/debian/patches/002_fix_tree_mode_sorting.patch new file mode 100644 index 0000000..81391f0 --- /dev/null +++ b/debian/patches/002_fix_tree_mode_sorting.patch @@ -0,0 +1,26 @@ +From 5d778eaacc78c69d5597b57afb4f98062d8856ef Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Wed, 17 Jan 2024 14:04:24 +1100 +Subject: [PATCH] Undo too-aggressive code collapsing from tree mode + refactoring + +--- + Process.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Process.c b/Process.c +index a36ab6c77..1497503f0 100644 +--- a/Process.c ++++ b/Process.c +@@ -902,7 +902,10 @@ int Process_compare(const void* v1, const void* v2) { + } + + int Process_compareByParent(const Row* r1, const Row* r2) { +- int result = Row_compareByParent_Base(r1, r2); ++ int result = SPACESHIP_NUMBER( ++ r1->isRoot ? 0 : Row_getGroupOrParent(r1), ++ r2->isRoot ? 0 : Row_getGroupOrParent(r2) ++ ); + + if (result != 0) + return result; diff --git a/debian/patches/003_fix_column_header_update.patch b/debian/patches/003_fix_column_header_update.patch new file mode 100644 index 0000000..7122d04 --- /dev/null +++ b/debian/patches/003_fix_column_header_update.patch @@ -0,0 +1,23 @@ +From 91990b1a34927a4136a85e4ff9adcdbfa500286a Mon Sep 17 00:00:00 2001 +From: Daniel Lange +Date: Wed, 17 Jan 2024 10:18:31 +0100 +Subject: [PATCH] Clicking on column headers needs to also update the sort + direction arrow + +--- + MainPanel.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/MainPanel.c b/MainPanel.c +index 83490236e..47b2f92fe 100644 +--- a/MainPanel.c ++++ b/MainPanel.c +@@ -92,7 +92,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { + } else { + reaction |= Action_setSortKey(settings, field); + } +- reaction |= HTOP_RECALCULATE | HTOP_REDRAW_BAR | HTOP_SAVE_SETTINGS; ++ reaction |= HTOP_RECALCULATE | HTOP_REDRAW_BAR | HTOP_UPDATE_PANELHDR | HTOP_SAVE_SETTINGS; + result = HANDLED; + } else if (EVENT_IS_SCREEN_TAB_CLICK(ch)) { + int x = EVENT_SCREEN_TAB_GET_X(ch); diff --git a/debian/patches/series b/debian/patches/series index 811a4a4..5b9b194 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ 001_fix_number_of_running_tasks.patch +002_fix_tree_mode_sorting.patch +003_fix_column_header_update.patch -- cgit v1.2.3