antognolli pushed a commit to branch master.
commit d4b7389f3ac1e0d62e9decb17d82460dca8ef935
Author: Rafael Antognolli <[email protected]>
Date: Tue May 7 18:09:02 2013 -0300
ecore/wayland: Store the multi position per device/finger.
This will make every touch point have its position updated on
multi_move, and then it can be used to send a correct multi_up event.
---
src/lib/ecore_wayland/ecore_wl_input.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c
b/src/lib/ecore_wayland/ecore_wl_input.c
index c27855a..b157bd0 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -43,6 +43,7 @@ typedef struct _Ecore_Wl_Mouse_Down_Info
int last_last_win;
int last_event_win;
int last_last_event_win;
+ int sx, sy;
unsigned int last_time;
unsigned int last_last_time;
Eina_Bool did_double : 1;
@@ -1016,6 +1017,7 @@ static void
_ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input, Ecore_Wl_Window *win,
unsigned int timestamp, int device)
{
Ecore_Event_Mouse_Move *ev;
+ Ecore_Wl_Mouse_Down_Info *down_info;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -1036,6 +1038,12 @@ _ecore_wl_input_mouse_move_send(Ecore_Wl_Input *input,
Ecore_Wl_Window *win, uns
ev->multi.x = input->sx;
ev->multi.y = input->sy;
+ if ((down_info = _ecore_wl_mouse_down_info_get(device)))
+ {
+ down_info->sx = input->sx;
+ down_info->sy = input->sy;
+ }
+
if (win)
{
ev->window = win->id;
@@ -1154,6 +1162,8 @@ _ecore_wl_input_mouse_down_send(Ecore_Wl_Input *input,
Ecore_Wl_Window *win, int
* devices */
if ((down_info = _ecore_wl_mouse_down_info_get(device)))
{
+ down_info->sx = input->sx;
+ down_info->sy = input->sy;
if (down_info->did_triple)
{
down_info->last_win = 0;
@@ -1260,6 +1270,13 @@ _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->multi.x = down_info->sx;
+ ev->multi.y = down_info->sy;
+ }
+ else
+ {
+ ev->multi.x = input->sx;
+ ev->multi.y = input->sy;
}
ev->multi.device = device;
@@ -1268,8 +1285,6 @@ _ecore_wl_input_mouse_up_send(Ecore_Wl_Input *input,
Ecore_Wl_Window *win, int d
ev->multi.radius_y = 1;
ev->multi.pressure = 1.0;
ev->multi.angle = 0.0;
- ev->multi.x = input->sx;
- ev->multi.y = input->sy;
if (win)
{
--
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may