ecore_wl2_input: do not change a cursor theme if the same one is already set 88/290188/1
authorduna.oh <duna.oh@samsung.com>
Tue, 21 Mar 2023 07:50:03 +0000 (16:50 +0900)
committerduna.oh <duna.oh@samsung.com>
Tue, 21 Mar 2023 07:50:05 +0000 (16:50 +0900)
This commit fixed the issue that sometimes cursor is set to null buffer
when destroying and loading cursor theme repeatably.

Change-Id: I80d96920dbe0be5c198bdceb0c8219dca8706956

src/lib/ecore_wl2/ecore_wl2_input.c

index 37f413e..bceb10f 100644 (file)
@@ -3863,6 +3863,9 @@ ecore_wl2_input_cursor_theme_name_set(Ecore_Wl2_Input *input, const char *cursor
 {
    if (!input) return;
 
+   if (eina_streq(input->cursor.theme_name, cursor_theme_name))
+     return;
+
    eina_stringshare_replace(&input->cursor.theme_name, cursor_theme_name);
 
    EINA_SAFETY_ON_NULL_RETURN(input->display->wl.shm);