From 1278ec57bfbabeb5a88adb88c010fea57c96d5d0 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Thu, 16 Aug 2012 09:53:05 +0000 Subject: [PATCH] Ecore_Wayland: If user tries to set a cursor name, but this cursor does not exist in the current theme, then fallback to default left pointer image. SVN revision: 75315 --- .../src/lib/ecore_wayland/ecore_wl_input.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/legacy/ecore/src/lib/ecore_wayland/ecore_wl_input.c b/legacy/ecore/src/lib/ecore_wayland/ecore_wl_input.c index 4bd590d020..cf9b086f3b 100644 --- a/legacy/ecore/src/lib/ecore_wayland/ecore_wl_input.c +++ b/legacy/ecore/src/lib/ecore_wayland/ecore_wl_input.c @@ -172,17 +172,16 @@ ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input *input, const char *cursor_na eina_stringshare_replace(&input->cursor_name, cursor_name); - /* No cursor */ - if (!cursor_name) - { - ecore_wl_input_pointer_set(input, NULL, 0, 0); - return; - } + /* No cursor. Set to default Left Pointer */ + if (!cursor_name) + eina_stringshare_replace(&input->cursor_name, "left_ptr"); - if (!(cursor = ecore_wl_cursor_get(cursor_name))) + /* try to get this cursor from the theme */ + if (!(cursor = ecore_wl_cursor_get(input->cursor_name))) { - ecore_wl_input_pointer_set(input, NULL, 0, 0); - return; + /* if the theme does not have this cursor, default to left pointer */ + if (!(cursor = ecore_wl_cursor_get("left_ptr"))) + return; } if ((!cursor->images) || (!cursor->images[0]))