raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=870c81fd7282a355f9bdcf298ef87cb374575bdb

commit 870c81fd7282a355f9bdcf298ef87cb374575bdb
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Jul 9 11:57:30 2016 +0900

    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);

-- 


Reply via email to