pointer - use the swallowed obj geom as that is what we are tracking

This commit is contained in:
Carsten Haitzler 2019-11-16 14:21:15 +00:00
parent 60324a7b2c
commit 42d8e3b07b
1 changed files with 9 additions and 8 deletions

View File

@ -225,7 +225,7 @@ _e_pointer_cb_hot_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA
if (!ptr->e_cursor) return; if (!ptr->e_cursor) return;
if (!evas_object_visible_get(ptr->o_ptr)) return; if (!evas_object_visible_get(ptr->o_ptr)) return;
edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot", evas_object_geometry_get(ptr->buffer_o_hot,
&x, &y, NULL, NULL); &x, &y, NULL, NULL);
_e_pointer_hot_update(ptr, x, y); _e_pointer_hot_update(ptr, x, y);
} }
@ -237,7 +237,7 @@ _e_pointer_cb_hot_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA
int x = 0, y = 0; int x = 0, y = 0;
if (!ptr->e_cursor) return; if (!ptr->e_cursor) return;
edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot", evas_object_geometry_get(ptr->buffer_o_hot,
&x, &y, NULL, NULL); &x, &y, NULL, NULL);
_e_pointer_hot_update(ptr, x, y); _e_pointer_hot_update(ptr, x, y);
} }
@ -465,6 +465,7 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
/* try to set the edje object theme */ /* try to set the edje object theme */
if (!e_theme_edje_object_set(ptr->o_ptr, "base/theme/pointer", cursor)) if (!e_theme_edje_object_set(ptr->o_ptr, "base/theme/pointer", cursor))
cursor[0] = 0; cursor[0] = 0;
edje_object_part_swallow(ptr->o_ptr, "e.swallow.hotspot", ptr->o_hot);
if (!init) if (!init)
{ {
edje_object_signal_emit(ptr->o_ptr, "e,state,init", "e"); edje_object_signal_emit(ptr->o_ptr, "e,state,init", "e");
@ -474,7 +475,7 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
_e_pointer_x11_setup(ptr, cursor); _e_pointer_x11_setup(ptr, cursor);
if (!cursor[0]) return; if (!cursor[0]) return;
edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot", evas_object_geometry_get(ptr->buffer_o_hot,
&x, &y, NULL, NULL); &x, &y, NULL, NULL);
_e_pointer_hot_update(ptr, x, y); _e_pointer_hot_update(ptr, x, y);