summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_device.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:34:10 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:27:43 -0400
commit6775b23212305c957f4447c708053585f361bb86 (patch)
treee2124ab06d22565d80f00ab112237238fd5dc520 /src/lib/evas/canvas/evas_device.c
parentd4ce9b1ac38b6297ceccc8cdbb9b0bb2e8f3ec66 (diff)
evas: better handle async device creation of default mouse
instead of yolo setting the first pointer-ish device which is created, check to see if a better match for "default mouse" can be applied @fix
Diffstat (limited to 'src/lib/evas/canvas/evas_device.c')
-rw-r--r--src/lib/evas/canvas/evas_device.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_device.c b/src/lib/evas/canvas/evas_device.c
index 2e7763a..ae048e6 100644
--- a/src/lib/evas/canvas/evas_device.c
+++ b/src/lib/evas/canvas/evas_device.c
@@ -190,7 +190,21 @@ evas_device_add_full(Evas *eo_e, const char *name, const char *desc,
190 return NULL; 190 return NULL;
191 } 191 }
192 192
193 if (!e->default_mouse) 193 if (e->default_mouse)
194 {
195 int x, y;
196
197 if ((clas == EVAS_DEVICE_CLASS_MOUSE) &&
198 (parent_dev == e->default_seat) &&
199 (evas_device_class_get(e->default_mouse) != EVAS_DEVICE_CLASS_MOUSE))
200 {
201 evas_pointer_canvas_xy_get(eo_e, &x, &y);
202 evas_event_feed_mouse_out(eo_e, 0, NULL);
203 e->default_mouse = dev;
204 evas_event_feed_mouse_in(eo_e, 0, NULL);
205 }
206 }
207 else
194 e->default_mouse = dev; 208 e->default_mouse = dev;
195 } 209 }
196 210