ecore/wayland: Get the touch up event position from the down_info.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 28 Nov 2013 19:53:42 +0000 (17:53 -0200)
committerRafael Antognolli <rafael.antognolli@intel.com>
Fri, 29 Nov 2013 20:05:06 +0000 (18:05 -0200)
down_info is a struct that stores some information about the current
pressed touch events. It should be used for that specific touch point,
instead of the generic input info, when sending a mouse_up event.

src/lib/ecore_wayland/ecore_wl_input.c

index a9b7ac6..4661891 100644 (file)
@@ -1357,8 +1357,6 @@ _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win, int d
      ev->buttons = button;
 
    ev->timestamp = timestamp;
-   ev->x = input->sx;
-   ev->y = input->sy;
    ev->root.x = input->sx;
    ev->root.y = input->sy;
    ev->modifiers = input->modifiers;
@@ -1372,11 +1370,15 @@ _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win, int d
           ev->double_click = 1;
         if (down_info->did_triple)
           ev->triple_click = 1;
+        ev->x = down_info->sx;
+        ev->y = down_info->sy;
         ev->multi.x = down_info->sx;
         ev->multi.y = down_info->sy;
      }
    else
      {
+        ev->x = input->sx;
+        ev->y = input->sy;
         ev->multi.x = input->sx;
         ev->multi.y = input->sy;
      }