perf ui browser: Use libslang to read keys
Just another step in stopping the use of libnewt in perf. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-uy6s534uqxq8tenh6s3k8ocj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -18,6 +18,18 @@ static void newt_suspend(void *d __used)
|
||||
newtResume();
|
||||
}
|
||||
|
||||
static int ui__init(void)
|
||||
{
|
||||
int err = SLkp_init();
|
||||
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
SLkp_define_keysym((char *)"^(kB)", SL_KEY_UNTAB);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void ui__exit(void)
|
||||
{
|
||||
SLtt_set_cursor_visibility(1);
|
||||
@@ -44,6 +56,7 @@ void setup_browser(bool fallback_to_pager)
|
||||
|
||||
use_browser = 1;
|
||||
newtInit();
|
||||
ui__init();
|
||||
newtSetSuspendCallback(newt_suspend, NULL);
|
||||
ui_helpline__init();
|
||||
ui_browser__init();
|
||||
|
Reference in New Issue
Block a user