perf tui: Make CTRL+Z suspend perf
Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
6da80ce8c4
commit
73ae8f85fd
@ -11,6 +11,7 @@
|
|||||||
#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
|
#define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG
|
||||||
#endif
|
#endif
|
||||||
#include <slang.h>
|
#include <slang.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <newt.h>
|
#include <newt.h>
|
||||||
#include <sys/ttydefaults.h>
|
#include <sys/ttydefaults.h>
|
||||||
@ -891,6 +892,13 @@ static struct newtPercentTreeColors {
|
|||||||
"blue", "lightgray",
|
"blue", "lightgray",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void newt_suspend(void *d __used)
|
||||||
|
{
|
||||||
|
newtSuspend();
|
||||||
|
raise(SIGTSTP);
|
||||||
|
newtResume();
|
||||||
|
}
|
||||||
|
|
||||||
void setup_browser(void)
|
void setup_browser(void)
|
||||||
{
|
{
|
||||||
struct newtPercentTreeColors *c = &defaultPercentTreeColors;
|
struct newtPercentTreeColors *c = &defaultPercentTreeColors;
|
||||||
@ -904,6 +912,7 @@ void setup_browser(void)
|
|||||||
use_browser = 1;
|
use_browser = 1;
|
||||||
newtInit();
|
newtInit();
|
||||||
newtCls();
|
newtCls();
|
||||||
|
newtSetSuspendCallback(newt_suspend, NULL);
|
||||||
ui_helpline__puts(" ");
|
ui_helpline__puts(" ");
|
||||||
sltt_set_color(HE_COLORSET_TOP, NULL, c->topColorFg, c->topColorBg);
|
sltt_set_color(HE_COLORSET_TOP, NULL, c->topColorFg, c->topColorBg);
|
||||||
sltt_set_color(HE_COLORSET_MEDIUM, NULL, c->mediumColorFg, c->mediumColorBg);
|
sltt_set_color(HE_COLORSET_MEDIUM, NULL, c->mediumColorFg, c->mediumColorBg);
|
||||||
|
Loading…
Reference in New Issue
Block a user