summaryrefslogtreecommitdiff
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
commit50381e7911bf4a4b06d42f4b762152615a8123af (patch)
tree4226a0ac1a3cac7aae146083f7661563b7df9d52
parente21847e3fdd89be6bb61d3117c5aa1b747d60cdd (diff)
ecore-evas: clear cursor object cache when setting default cursor
@fix
-rw-r--r--src/lib/ecore_evas/ecore_evas.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 4f0ba32dd6..18d544abbf 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -1725,12 +1725,14 @@ _ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer,
1725 Ecore_Evas_Cursor *cursor; 1725 Ecore_Evas_Cursor *cursor;
1726 int x, y; 1726 int x, y;
1727 Evas_Object *old; 1727 Evas_Object *old;
1728 Efl_Input_Device *dpointer;
1728 1729
1729 ECORE_EVAS_CHECK(ee); 1730 ECORE_EVAS_CHECK(ee);
1730 1731
1732 dpointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
1731 if (!pointer) 1733 if (!pointer)
1732 { 1734 {
1733 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); 1735 pointer = dpointer;
1734 if (!pointer) 1736 if (!pointer)
1735 { 1737 {
1736 ee->prop.cursor_cache.object = obj; 1738 ee->prop.cursor_cache.object = obj;
@@ -1740,6 +1742,8 @@ _ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device *pointer,
1740 return; 1742 return;
1741 } 1743 }
1742 } 1744 }
1745 if (pointer == dpointer)
1746 memset(&ee->prop.cursor_cache, 0, sizeof(Ecore_Evas_Cursor));
1743 1747
1744 if (obj && ee->engine.func->fn_object_cursor_set) 1748 if (obj && ee->engine.func->fn_object_cursor_set)
1745 ee->engine.func->fn_object_cursor_set(ee, obj, layer, hot_x, hot_y); 1749 ee->engine.func->fn_object_cursor_set(ee, obj, layer, hot_x, hot_y);