evas: only feed canvas out/in when changing default pointer if pointer is in

ref 6775b23212
This commit is contained in:
Mike Blumenkrantz 2017-06-16 15:03:09 -04:00
parent 43b6c2eeb1
commit abe4c8d772
1 changed files with 7 additions and 2 deletions

View File

@ -198,9 +198,14 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
(parent_dev == e->default_seat) &&
(evas_device_class_get(e->default_mouse) != EVAS_DEVICE_CLASS_MOUSE))
{
evas_event_feed_mouse_out(eo_e, 0, NULL);
Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, e->default_mouse);
Eina_Bool inside = pdata->seat->inside;
if (inside)
evas_event_feed_mouse_out(eo_e, 0, NULL);
e->default_mouse = dev;
evas_event_feed_mouse_in(eo_e, 0, NULL);
if (inside)
evas_event_feed_mouse_in(eo_e, 0, NULL);
}
}
else