diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-12-16 18:23:34 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-01-06 17:46:10 +0300 |
commit | d07126560cab572539621702137eeeeb2a4edf30 (patch) | |
tree | 8d11be08b004a91223df947ab61f3d6d197630d1 /tools/perf/ui/browsers/res_sample.c | |
parent | d10ec006dcd7b20b2eb7e9ef32fc6f83b0112893 (diff) | |
download | linux-d07126560cab572539621702137eeeeb2a4edf30.tar.xz |
tools ui popup: Allow returning hotkeys
With this patch if an optional pointer is passed to ui__popup_menu()
then when any key that is not being handled (ENTER, ESC, etc) is typed,
it'll record that key in the pointer and return, allowing for hotkey
processing on the caller.
If NULL is passed, no change in logic, unhandled keys continue to be
ignored.
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-6ojn19mqzgmrdm8kdoigic0m@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/res_sample.c')
-rw-r--r-- | tools/perf/ui/browsers/res_sample.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/res_sample.c b/tools/perf/ui/browsers/res_sample.c index 76d356a18790..7cb2d6678039 100644 --- a/tools/perf/ui/browsers/res_sample.c +++ b/tools/perf/ui/browsers/res_sample.c @@ -56,7 +56,7 @@ int res_sample_browse(struct res_sample *res_samples, int num_res, return -1; } } - choice = ui__popup_menu(num_res, names); + choice = ui__popup_menu(num_res, names, NULL); for (i = 0; i < num_res; i++) zfree(&names[i]); free(names); |