From 86d293125565a15bbd94683080dbc755c5d7edee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 22 Dec 2020 17:12:38 +0100 Subject: Restore highlighted header of current sorted process column --- MainPanel.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'MainPanel.c') diff --git a/MainPanel.c b/MainPanel.c index 949138dc..c8a4c059 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -102,7 +102,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { MainPanel_updateTreeFunctions(this, this->state->settings->treeView); } if (reaction & HTOP_UPDATE_PANELHDR) { - ProcessList_printHeader(this->state->pl, Panel_getHeader(super)); + result |= REDRAW; } if (reaction & HTOP_REFRESH) { result |= REFRESH; @@ -168,13 +168,19 @@ static void MainPanel_drawFunctionBar(Panel* super) { } } +static void MainPanel_printHeader(Panel* super) { + MainPanel* this = (MainPanel*) super; + ProcessList_printHeader(this->state->pl, &super->header); +} + const PanelClass MainPanel_class = { .super = { .extends = Class(Panel), .delete = MainPanel_delete }, .eventHandler = MainPanel_eventHandler, - .drawFunctionBar = MainPanel_drawFunctionBar + .drawFunctionBar = MainPanel_drawFunctionBar, + .printHeader = MainPanel_printHeader }; MainPanel* MainPanel_new() { -- cgit v1.2.3