summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorChristopher Michael <cpmichael1@comcast.net>2012-08-16 09:53:05 +0000
committerChristopher Michael <cpmichael1@comcast.net>2012-08-16 09:53:05 +0000
commit1278ec57bfbabeb5a88adb88c010fea57c96d5d0 (patch)
tree0b82c62b400a9506780ce5851784d2590a6e283c /legacy/ecore
parentbdfd355e38c65f156c6b52369e653cc88567077a (diff)
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
Diffstat (limited to 'legacy/ecore')
-rw-r--r--legacy/ecore/src/lib/ecore_wayland/ecore_wl_input.c17
1 files 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
172 172
173 eina_stringshare_replace(&input->cursor_name, cursor_name); 173 eina_stringshare_replace(&input->cursor_name, cursor_name);
174 174
175 /* No cursor */ 175 /* No cursor. Set to default Left Pointer */
176 if (!cursor_name) 176 if (!cursor_name)
177 { 177 eina_stringshare_replace(&input->cursor_name, "left_ptr");
178 ecore_wl_input_pointer_set(input, NULL, 0, 0);
179 return;
180 }
181 178
182 if (!(cursor = ecore_wl_cursor_get(cursor_name))) 179 /* try to get this cursor from the theme */
180 if (!(cursor = ecore_wl_cursor_get(input->cursor_name)))
183 { 181 {
184 ecore_wl_input_pointer_set(input, NULL, 0, 0); 182 /* if the theme does not have this cursor, default to left pointer */
185 return; 183 if (!(cursor = ecore_wl_cursor_get("left_ptr")))
184 return;
186 } 185 }
187 186
188 if ((!cursor->images) || (!cursor->images[0])) 187 if ((!cursor->images) || (!cursor->images[0]))