aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/evas/canvas/evas_device.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 15:03:09 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-16 12:23:08 -0400
commite3126bd23f333e849dd99ff09e28dafcef66231f (patch)
treed999bdae3d52019e0aa7304b493f213d0fe4ce44 /src/lib/evas/canvas/evas_device.c
parentevas: change _evas_pointer_data_add() to return created pointer data (diff)
downloadefl-e3126bd23f333e849dd99ff09e28dafcef66231f.tar.gz
evas: create dummy seat data for wl/drm outputs, store some pointer data
with async device init, it's possible for mouse in/out/move events to be added by an application before the pointer devices are created. these are independent of devices, so store the state and apply when pointer devices are added fix https://phab.enlightenment.org/T5531
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index c5ae77b10b..def1965341 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -186,7 +186,8 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
e->default_keyboard = dev;
else if (_is_pointer(clas))
{
- if (!_evas_pointer_data_add(e, dev))
+ Evas_Pointer_Data *pdata = _evas_pointer_data_add(e, dev);
+ if (!pdata)
{
efl_del(dev);
return NULL;
@@ -198,7 +199,6 @@ 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_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, e->default_mouse);
Eina_Bool inside = pdata->seat->inside;
if (inside)
@@ -209,7 +209,19 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
}
}
else
- e->default_mouse = dev;
+ {
+ Evas_Pointer_Seat *pseat;
+
+ EINA_INLIST_FOREACH(e->seats, pseat)
+ if (!pseat->pointers) break;
+ e->default_mouse = dev;
+ if (pseat)
+ {
+ if (pseat->inside)
+ evas_event_feed_mouse_in(eo_e, 0, NULL);
+ evas_event_feed_mouse_move(eo_e, pseat->x, pseat->y, 0, NULL);
+ }
+ }
}
// FIXME: All devices are in the same list, while evas only refs the seats