mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Make clicks on leftmost panel in the Setup screen change setup pages,
like the keyboard navigation does. Fixes bug reported by Tero Keinanen. https://sourceforge.net/tracker/index.php?func=detail&aid=1754735&group_id=108839&atid=651633
This commit is contained in:
5
Panel.c
5
Panel.c
@ -31,6 +31,8 @@ typedef enum HandlerResult_ {
|
||||
BREAK_LOOP
|
||||
} HandlerResult;
|
||||
|
||||
#define EVENT_SETSELECTED -1
|
||||
|
||||
typedef HandlerResult(*Panel_EventHandler)(Panel*, int);
|
||||
|
||||
struct Panel_ {
|
||||
@ -222,6 +224,9 @@ void Panel_setSelected(Panel* this, int selected) {
|
||||
|
||||
selected = MAX(0, MIN(Vector_size(this->items) - 1, selected));
|
||||
this->selected = selected;
|
||||
if (this->eventHandler) {
|
||||
this->eventHandler(this, EVENT_SETSELECTED);
|
||||
}
|
||||
}
|
||||
|
||||
void Panel_draw(Panel* this, bool focus) {
|
||||
|
Reference in New Issue
Block a user