From 07b44a514c7dec2aa4344511f5ecd19210c9bb8c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 31 Jan 2019 11:39:16 +0100 Subject: tweak console switching --- fbpdf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'fbpdf.c') diff --git a/fbpdf.c b/fbpdf.c index 4f6562e..dfde24d 100644 --- a/fbpdf.c +++ b/fbpdf.c @@ -198,9 +198,15 @@ static void cleanup_and_exit(int code) exit(code); } -static void console_switch_redraw(void) +static void console_switch_suspend(void) +{ + kbd_suspend(); +} + +static void console_switch_resume(void) { gfx->restore_display(); + kbd_resume(); } static void @@ -319,7 +325,8 @@ int main(int argc, char *argv[]) } exit_signals_init(); signal(SIGTSTP,SIG_IGN); - if (console_switch_init(console_switch_redraw) < 0) { + if (console_switch_init(console_switch_suspend, + console_switch_resume) < 0) { fprintf(stderr, "NOTICE: No vt switching available on terminal.\n"); fprintf(stderr, "NOTICE: Not started from linux console? CONFIG_VT=n?\n"); if (framebuffer) { -- cgit