elput - remove pointless code in handling touch event
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 02:57:30 +0000 (11:57 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 02:57:30 +0000 (11:57 +0900)
i commented the pointless code out. this fixes CID 1357145

src/lib/elput/elput_evdev.c

index 53279c9..5393a07 100644 (file)
@@ -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);