aboutsummaryrefslogtreecommitdiffstats
path: root/kbd.c
diff options
context:
space:
mode:
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);
+}