input->pointer.sy = wl_fixed_to_double(sy);
// Cursor change from configuration is applied only for default cursor
- if (!input->cursor.theme_name || eina_streq(input->cursor.theme_name, "default"))
+ if (eina_streq(input->cursor.theme_name, "default"))
{
_ecore_wl2_cursor_config_reload();
config_cursor_name = _ecore_wl2_cursor_config_name_get();
}
// TIZEN_ONLY(20171207): add functions to set client's custom cursors
+ // TIZEN_ONLY(20230330): support client that requests to unset cursor
/* The cursor on the surface is undefined until we set it */
- ecore_wl2_input_cursor_from_name_set(input, input->cursor.name);
+ if (!input->cursor.name)
+ ecore_wl2_input_pointer_set(input, NULL, 0, 0);
+ else
+ ecore_wl2_input_cursor_from_name_set(input, input->cursor.name);
+ //
//
/* find the window which this surface belongs to */
cursor_theme_name = getenv("ECORE_WL_CURSOR_THEME_NAME");
ecore_wl2_input_cursor_theme_name_set(input, cursor_theme_name);
+
+ // TIZEN_ONLY(20230330): support client that requests to unset cursor
+ if (!input->cursor.name)
+ input->cursor.name = eina_stringshare_add("left_ptr");
+ //
#endif
//
}
surface, hot_x, hot_y);
//
+ // TIZEN_ONLY(20230330): support client that requests to unset cursor
+ if (!surface)
+ {
+ if (input->cursor.name) eina_stringshare_del(input->cursor.name);
+ input->cursor.name = NULL;
+ ecore_wl2_display_flush(input->display);
+ return;
+ }
+ //
+
input->cursor.surface = surface;
input->cursor.hot_x = hot_x;
input->cursor.hot_y = hot_y;
eina_stringshare_replace(&win->pointer.cursor_name, cursor_name);
- if ((input->cursor.name) && (strcmp(input->cursor.name, win->pointer.cursor_name)))
+ // TIZEN_ONLY(20230330): support client that requests to unset cursor
+ if (input->cursor.name)
+ {
+ if (strcmp(input->cursor.name, win->pointer.cursor_name))
+ ecore_wl2_input_cursor_from_name_set(input, cursor_name);
+ }
+ else
ecore_wl2_input_cursor_from_name_set(input, cursor_name);
+ //
}
EAPI void