aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/ui/browser.c5
-rw-r--r--tools/perf/util/ui/browser.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/ui/browser.c b/tools/perf/util/ui/browser.c
index 556829124b0..076a5ffc8f5 100644
--- a/tools/perf/util/ui/browser.c
+++ b/tools/perf/util/ui/browser.c
@@ -27,9 +27,12 @@ static int ui_browser__percent_color(struct ui_browser *browser,
27 return HE_COLORSET_NORMAL; 27 return HE_COLORSET_NORMAL;
28} 28}
29 29
30void ui_browser__set_color(struct ui_browser *self __used, int color) 30int ui_browser__set_color(struct ui_browser *browser, int color)
31{ 31{
32 int ret = browser->current_color;
33 browser->current_color = color;
32 SLsmg_set_color(color); 34 SLsmg_set_color(color);
35 return ret;
33} 36}
34 37
35void ui_browser__set_percent_color(struct ui_browser *self, 38void ui_browser__set_percent_color(struct ui_browser *self,
diff --git a/tools/perf/util/ui/browser.h b/tools/perf/util/ui/browser.h
index 6ee82f60fea..65b25921529 100644
--- a/tools/perf/util/ui/browser.h
+++ b/tools/perf/util/ui/browser.h
@@ -15,6 +15,7 @@ struct ui_browser {
15 u64 index, top_idx; 15 u64 index, top_idx;
16 void *top, *entries; 16 void *top, *entries;
17 u16 y, x, width, height; 17 u16 y, x, width, height;
18 int current_color;
18 void *priv; 19 void *priv;
19 const char *title; 20 const char *title;
20 char *helpline; 21 char *helpline;
@@ -27,7 +28,7 @@ struct ui_browser {
27 bool use_navkeypressed; 28 bool use_navkeypressed;
28}; 29};
29 30
30void ui_browser__set_color(struct ui_browser *self, int color); 31int ui_browser__set_color(struct ui_browser *browser, int color);
31void ui_browser__set_percent_color(struct ui_browser *self, 32void ui_browser__set_percent_color(struct ui_browser *self,
32 double percent, bool current); 33 double percent, bool current);
33bool ui_browser__is_current_entry(struct ui_browser *self, unsigned row); 34bool ui_browser__is_current_entry(struct ui_browser *self, unsigned row);