diff options
-rw-r--r-- | tools/perf/util/newt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/newt.c b/tools/perf/util/newt.c index 28f74eb8fe7c..91de99b58445 100644 --- a/tools/perf/util/newt.c +++ b/tools/perf/util/newt.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG | 11 | #define HAVE_LONG_LONG __GLIBC_HAVE_LONG_LONG |
12 | #endif | 12 | #endif |
13 | #include <slang.h> | 13 | #include <slang.h> |
14 | #include <signal.h> | ||
14 | #include <stdlib.h> | 15 | #include <stdlib.h> |
15 | #include <newt.h> | 16 | #include <newt.h> |
16 | #include <sys/ttydefaults.h> | 17 | #include <sys/ttydefaults.h> |
@@ -891,6 +892,13 @@ static struct newtPercentTreeColors { | |||
891 | "blue", "lightgray", | 892 | "blue", "lightgray", |
892 | }; | 893 | }; |
893 | 894 | ||
895 | static void newt_suspend(void *d __used) | ||
896 | { | ||
897 | newtSuspend(); | ||
898 | raise(SIGTSTP); | ||
899 | newtResume(); | ||
900 | } | ||
901 | |||
894 | void setup_browser(void) | 902 | void setup_browser(void) |
895 | { | 903 | { |
896 | struct newtPercentTreeColors *c = &defaultPercentTreeColors; | 904 | struct newtPercentTreeColors *c = &defaultPercentTreeColors; |
@@ -904,6 +912,7 @@ void setup_browser(void) | |||
904 | use_browser = 1; | 912 | use_browser = 1; |
905 | newtInit(); | 913 | newtInit(); |
906 | newtCls(); | 914 | newtCls(); |
915 | newtSetSuspendCallback(newt_suspend, NULL); | ||
907 | ui_helpline__puts(" "); | 916 | ui_helpline__puts(" "); |
908 | sltt_set_color(HE_COLORSET_TOP, NULL, c->topColorFg, c->topColorBg); | 917 | sltt_set_color(HE_COLORSET_TOP, NULL, c->topColorFg, c->topColorBg); |
909 | sltt_set_color(HE_COLORSET_MEDIUM, NULL, c->mediumColorFg, c->mediumColorBg); | 918 | sltt_set_color(HE_COLORSET_MEDIUM, NULL, c->mediumColorFg, c->mediumColorBg); |