aboutsummaryrefslogtreecommitdiffstats
path: root/kbd.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-01-18 13:08:33 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-01-18 13:08:33 +0100
commit6dd9dfd266aae08880a9634c1ec015043258f92f (patch)
tree3958f1286a800cb3035edab7058037390d44fe66 /kbd.c
parentd88041d909b2118ebc67b356b2848fb8bdfc8f2c (diff)
downloadfbida-6dd9dfd266aae08880a9634c1ec015043258f92f.tar.gz
libinput: handle console switches
Diffstat (limited to 'kbd.c')
-rw-r--r--kbd.c15
1 files changed, 14 insertions, 1 deletions
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);
+}