summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-03-05 11:33:57 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-03-05 11:33:57 -0500
commitcb656ec20cfdc729a691b0201c6133188cbc9820 (patch)
tree368fdfc1ca1dc1f7293569695df1af6093e0afa7
parentac67dc68aee0cc78e700845b06edd2a3d712cc1a (diff)
cursor object changes are now rejected if creating the new cursor fails
previous behavior resulted in a deleted cursor
-rw-r--r--src/lib/els_cursor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/els_cursor.c b/src/lib/els_cursor.c
index 0825d56bb..3e18fdeaa 100644
--- a/src/lib/els_cursor.c
+++ b/src/lib/els_cursor.c
@@ -239,17 +239,19 @@ _elm_cursor_set(Elm_Cursor *cur)
239 if (cur->visible) return; 239 if (cur->visible) return;
240 240
241 evas_event_freeze(cur->evas); 241 evas_event_freeze(cur->evas);
242 cur->visible = EINA_TRUE;
243 if (!cur->use_engine) 242 if (!cur->use_engine)
244 { 243 {
245 if (!cur->obj) 244 if (!cur->obj)
246 _elm_cursor_obj_add(cur->eventarea, cur); 245 _elm_cursor_obj_add(cur->eventarea, cur);
247 ecore_evas_object_cursor_set(cur->ee, cur->obj, 246 if (cur->obj)
248 ELM_OBJECT_LAYER_CURSOR, cur->hot_x, 247 ecore_evas_object_cursor_set(cur->ee, cur->obj,
249 cur->hot_y); 248 ELM_OBJECT_LAYER_CURSOR, cur->hot_x,
249 cur->hot_y);
250 cur->visible = !!cur->obj;
250 } 251 }
251 else 252 else
252 { 253 {
254 cur->visible = EINA_TRUE;
253 if (cur->obj) 255 if (cur->obj)
254 { 256 {
255 evas_object_del(cur->obj); 257 evas_object_del(cur->obj);