aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fbi.c7
-rw-r--r--fbpdf.c7
-rw-r--r--kbd.c7
-rw-r--r--kbd.h2
-rw-r--r--kbdtest.c2
5 files changed, 6 insertions, 19 deletions
diff --git a/fbi.c b/fbi.c
index 5838ea3..9dab5b6 100644
--- a/fbi.c
+++ b/fbi.c
@@ -1326,7 +1326,6 @@ int main(int argc, char *argv[])
int once;
int i, arg, key;
bool framebuffer = false;
- bool use_grab = false;
bool use_libinput;
char *info, *desc, *device, *output, *mode;
char linebuffer[128];
@@ -1445,15 +1444,11 @@ int main(int argc, char *argv[])
fprintf(stderr, "WARNING: Other processes (fbcon too) can write to display.\n");
fprintf(stderr, "WARNING: Also can't properly cleanup on exit.\n");
}
- if (use_libinput) {
- fprintf(stderr, "NOTICE: Using input device grab.\n");
- use_grab = true;
- }
}
shadow_init(gfx);
/* svga main loop */
- kbd_init(use_libinput, use_grab, gfx->devnum);
+ kbd_init(use_libinput, gfx->devnum);
desc = NULL;
info = NULL;
for (;;) {
diff --git a/fbpdf.c b/fbpdf.c
index 32e1b2d..91ccecd 100644
--- a/fbpdf.c
+++ b/fbpdf.c
@@ -237,7 +237,6 @@ int main(int argc, char *argv[])
{
GError *err = NULL;
bool framebuffer = false;
- bool use_grab = false;
bool use_libinput;
bool quit, newpage, pageflip;
char cwd[1024];
@@ -328,10 +327,6 @@ int main(int argc, char *argv[])
fprintf(stderr, "WARNING: Other processes (fbcon too) can write to display.\n");
fprintf(stderr, "WARNING: Also can't properly cleanup on exit.\n");
}
- if (use_libinput) {
- fprintf(stderr, "NOTICE: Using input device grab.\n");
- use_grab = true;
- }
}
surface1 = cairo_image_surface_create_for_data(gfx->mem,
@@ -347,7 +342,7 @@ int main(int argc, char *argv[])
gfx->stride);
}
- kbd_init(use_libinput, use_grab, gfx->devnum);
+ kbd_init(use_libinput, gfx->devnum);
index = 0;
newpage = true;
diff --git a/kbd.c b/kbd.c
index a358e10..4ed2540 100644
--- a/kbd.c
+++ b/kbd.c
@@ -195,7 +195,6 @@ static int file_wait(int fd, int timeout)
/* ---------------------------------------------------------------------- */
-static bool devgrab;
static int devcount;
static int open_restricted(const char *path, int flags, void *user_data)
@@ -209,8 +208,7 @@ static int open_restricted(const char *path, int flags, void *user_data)
}
fprintf(stderr, "using %s\n", path);
- if (devgrab)
- ioctl(fd, EVIOCGRAB, 1);
+ ioctl(fd, EVIOCGRAB, 1);
devcount++;
return fd;
}
@@ -228,14 +226,13 @@ static const struct libinput_interface interface = {
static struct libinput *ctx;
-void kbd_init(bool use_libinput, bool use_grab, dev_t gfx)
+void kbd_init(int use_libinput, dev_t gfx)
{
struct udev *udev;
struct udev_device *ugfx;
const char *seat = NULL;
if (use_libinput) {
- devgrab = use_grab;
udev = udev_new();
ugfx = udev_device_new_from_devnum(udev, 'c', gfx);
if (ugfx)
diff --git a/kbd.h b/kbd.h
index 68f06a3..10aa12d 100644
--- a/kbd.h
+++ b/kbd.h
@@ -5,7 +5,7 @@
#define KEY_MOD_SHIFT (1 << 0)
#define KEY_MOD_CTRL (1 << 1)
-void kbd_init(bool use_libinput, bool use_grab, dev_t gfx);
+void kbd_init(int use_libinput, dev_t gfx);
int kbd_wait(int timeout);
int kbd_read(char *buf, uint32_t len,
uint32_t *keycode, uint32_t *modifier);
diff --git a/kbdtest.c b/kbdtest.c
index 77a41d9..d1768c2 100644
--- a/kbdtest.c
+++ b/kbdtest.c
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
char key[32];
int rc,i;
- kbd_init(0, 0, 0);
+ kbd_init(0, 0);
for (;;) {
kbd_wait(10);