From 9ff29ccb94a3d107842e5fe7247a291569cf1aa8 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Tue, 10 Nov 2020 18:52:44 +0800 Subject: [PATCH] do not return for EV_KEY --- src/ial/singletouchkey.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ial/singletouchkey.c b/src/ial/singletouchkey.c index e0328c3f..5a2af0b9 100644 --- a/src/ial/singletouchkey.c +++ b/src/ial/singletouchkey.c @@ -102,9 +102,6 @@ static int get_touch_data (short *x, short *y, short *button) _WRN_PRINTF ("unknow event code for EV_KEY event: 0x%x, 0x%x\n", data.code, data.value); return -1; } - - /* return immediately for EV_KEY */ - return 0; } else if (data.type == EV_ABS) { switch (data.code) { @@ -159,13 +156,10 @@ static void mouse_getxy (int *x, int* y) static int mouse_getbutton (void) { - int button = 0; if (MOUSEBUTTON == IAL_MOUSE_LEFTBUTTON) - button |= IAL_MOUSE_LEFTBUTTON; - else if (MOUSEBUTTON == IAL_MOUSE_RIGHTBUTTON) - button |= IAL_MOUSE_RIGHTBUTTON; + return IAL_MOUSE_LEFTBUTTON; - return button; + return 0; } static int wait_event (int which, int maxfd, fd_set *in, fd_set *out, fd_set *except,