aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/aib.c b/aib.c
index 0f6129d..ea4c2f8 100644
--- a/aib.c
+++ b/aib.c
@@ -43,7 +43,7 @@ static void usage(char *progname)
static int input_device_init(const char *device)
{
- int indev_fd;
+ int indev_fd, grab = 1;
char *devname = NULL;
indev_fd = openx(device, O_RDONLY);
@@ -52,6 +52,7 @@ static int input_device_init(const char *device)
if (devname == NULL)
return indev_fd;
ioctlx(indev_fd, EVIOCGNAME(64), devname);
+ ioctlx(indev_fd, EVIOCGRAB, &grab);
printf("Capturing events for device %s\n", devname);
free(devname);