From 6dd9dfd266aae08880a9634c1ec015043258f92f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 18 Jan 2019 13:08:33 +0100 Subject: libinput: handle console switches --- kbd.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'kbd.c') diff --git a/kbd.c b/kbd.c index dbd9ef8..a358e10 100644 --- a/kbd.c +++ b/kbd.c @@ -209,7 +209,8 @@ static int open_restricted(const char *path, int flags, void *user_data) } fprintf(stderr, "using %s\n", path); - ioctl(fd, EVIOCGRAB, 1); + if (devgrab) + ioctl(fd, EVIOCGRAB, 1); devcount++; return fd; } @@ -318,3 +319,15 @@ int kbd_read(char *buf, uint32_t len, return rc; } } + +void kbd_suspend(void) +{ + if (ctx) + libinput_suspend(ctx); +} + +void kbd_resume(void) +{ + if (ctx) + libinput_resume(ctx); +} -- cgit