summaryrefslogtreecommitdiff
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
commitcad9d8fb55472830c9a981fa5a65fe8555caa1a3 (patch)
tree2b852b5e3d0af5d1172f6701734805c34deb9812 /src/lib/evas/canvas/evas_device.c
parente3126bd23f333e849dd99ff09e28dafcef66231f (diff)
evas: store current pointer state to dummy seat data if seat detaches
ensure the pointer state is maintained when devices are removed and added
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index def1965..84f3644 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -88,6 +88,25 @@ _del_cb(void *data, const Efl_Event *ev)
88 else if (e->default_keyboard == ev->object) 88 else if (e->default_keyboard == ev->object)
89 e->default_keyboard = _new_default_device_find(e, ev->object); 89 e->default_keyboard = _new_default_device_find(e, ev->object);
90 90
91 if ((efl_input_device_type_get(ev->object) == EFL_INPUT_DEVICE_TYPE_SEAT) && (!e->default_seat))
92 {
93 Evas_Pointer_Data *pdata = _evas_pointer_data_by_device_get(e, ev->object);
94 if (pdata)
95 {
96 Evas_Pointer_Seat *pseat;
97
98 EINA_INLIST_FOREACH(e->seats, pseat)
99 {
100 /* store to dummy seat data for when seat reattaches */
101 if (pseat->seat) continue;
102 pseat->x = pdata->seat->x;
103 pseat->y = pdata->seat->y;
104 pseat->inside = pdata->seat->inside;
105 break;
106 }
107 }
108 }
109
91 _evas_pointer_data_remove(e, ev->object); 110 _evas_pointer_data_remove(e, ev->object);
92 eina_hash_del_by_key(e->locks.masks, &ev->object); 111 eina_hash_del_by_key(e->locks.masks, &ev->object);
93 eina_hash_del_by_key(e->modifiers.masks, &ev->object); 112 eina_hash_del_by_key(e->modifiers.masks, &ev->object);