forked from enlightenment/efl
Add ecore_win32_cursor_show() API and ecore_evas_win32_cursor_(un)set() functions
This fixes double mouse cursor in elm entries on Windows (for example) @feature @fix
This commit is contained in:
parent
804ce5f514
commit
bdb62b6bbe
|
@ -675,6 +675,8 @@ EAPI const Ecore_Win32_Cursor *ecore_win32_cursor_x11_shaped_get(Ecore_Win32_Cur
|
|||
|
||||
EAPI void ecore_win32_cursor_size_get(int *width, int *height);
|
||||
|
||||
EAPI void ecore_win32_cursor_show(Eina_Bool show);
|
||||
|
||||
|
||||
|
||||
/* Drag and drop */
|
||||
|
|
|
@ -355,6 +355,14 @@ ecore_win32_cursor_size_get(int *width, int *height)
|
|||
if (*height) *height = GetSystemMetrics(SM_CYCURSOR);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_win32_cursor_show(Eina_Bool show)
|
||||
{
|
||||
INF("show cursor");
|
||||
|
||||
ShowCursor(show ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -908,6 +908,22 @@ _ecore_evas_win32_size_step_set(Ecore_Evas *ee, int width, int height)
|
|||
width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj,
|
||||
int layer EINA_UNUSED,
|
||||
int hot_x EINA_UNUSED,
|
||||
int hot_y EINA_UNUSED)
|
||||
{
|
||||
if (obj != _ecore_evas_default_cursor_image_get(ee))
|
||||
ecore_win32_cursor_show(EINA_FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_object_cursor_unset(Ecore_Evas *ee)
|
||||
{
|
||||
ecore_win32_cursor_show(EINA_TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_win32_focus_set(Ecore_Evas *ee, Eina_Bool on EINA_UNUSED)
|
||||
{
|
||||
|
@ -1212,8 +1228,8 @@ static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
|
|||
_ecore_evas_win32_size_max_set,
|
||||
_ecore_evas_win32_size_base_set,
|
||||
_ecore_evas_win32_size_step_set,
|
||||
NULL,
|
||||
NULL,
|
||||
_ecore_evas_win32_object_cursor_set,
|
||||
_ecore_evas_win32_object_cursor_unset,
|
||||
NULL, /* _ecore_evas_x_layer_set */
|
||||
_ecore_evas_win32_focus_set,
|
||||
_ecore_evas_win32_iconified_set,
|
||||
|
|
Loading…
Reference in New Issue