Ecore-Sdl: Must set the mouse event's multi struct to 0

Otherwise ecore-evas will think that the event is for multi touch
and will ignore the actual values of the structure and will only use
the uninitialized data from the multi struct

SVN revision: 63431
This commit is contained in:
Youness Alaoui 2011-09-16 07:08:53 +00:00
parent e4165d053b
commit 512599f1ba
1 changed files with 18 additions and 0 deletions

View File

@ -178,6 +178,12 @@ ecore_sdl_feed_events(void)
ev->root.x = ev->x;
ev->root.y = ev->y;
/* Must set multi touch device to 0 or it will get ignored */
ev->multi.device = 0;
ev->multi.radius = ev->multi.radius_x = ev->multi.radius_y = 0;
ev->multi.pressure = ev->multi.angle = 0;
ev->multi.x = ev->multi.y = ev->multi.root.x = ev->multi.root.y = 0;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
break;
}
@ -215,6 +221,12 @@ ecore_sdl_feed_events(void)
ev->double_click = 0;
ev->triple_click = 0;
/* Must set multi touch device to 0 or it will get ignored */
ev->multi.device = 0;
ev->multi.radius = ev->multi.radius_x = ev->multi.radius_y = 0;
ev->multi.pressure = ev->multi.angle = 0;
ev->multi.x = ev->multi.y = ev->multi.root.x = ev->multi.root.y = 0;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
}
break;
@ -233,6 +245,12 @@ ecore_sdl_feed_events(void)
ev->double_click = 0;
ev->triple_click = 0;
/* Must set multi touch device to 0 or it will get ignored */
ev->multi.device = 0;
ev->multi.radius = ev->multi.radius_x = ev->multi.radius_y = 0;
ev->multi.pressure = ev->multi.angle = 0;
ev->multi.x = ev->multi.y = ev->multi.root.x = ev->multi.root.y = 0;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
break;
}