diff options
-rw-r--r-- | fbi.c | 7 | ||||
-rw-r--r-- | fbpdf.c | 7 | ||||
-rw-r--r-- | kbd.c | 7 | ||||
-rw-r--r-- | kbd.h | 2 | ||||
-rw-r--r-- | kbdtest.c | 2 |
5 files changed, 6 insertions, 19 deletions
@@ -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 (;;) { @@ -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; @@ -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) @@ -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); @@ -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); |