From 870c81fd7282a355f9bdcf298ef87cb374575bdb Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 9 Jul 2016 11:57:30 +0900 Subject: [PATCH] elput - remove pointless code in handling touch event i commented the pointless code out. this fixes CID 1357145 --- src/lib/elput/elput_evdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index 53279c9..5393a07 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -1005,8 +1005,12 @@ _touch_event_send(Elput_Device *dev, struct libinput_event_touch *event, int typ ev->multi.root.y = ev->y; btn = ((btn & 0x00F) + 1); - if (btn == 3) btn = 2; - else if (btn == 2) btn = 3; +// XXX: this code is useless. above btn is set to 0 at declaration time, then +// no code changes it until the above like effectively makes it 1. it can +// only ever be 1 so the below lines are pointless. this is probably a bug +// lurking... +// if (btn == 3) btn = 2; +// else if (btn == 2) btn = 3; ev->buttons = btn; ecore_event_add(type, ev, NULL, NULL); -- 2.7.4