raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=64f87877a6294ab46684f0da36ef7bc6f1dabe59

commit 64f87877a6294ab46684f0da36ef7bc6f1dabe59
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Wed Apr 1 20:12:15 2020 +0100

    fix pointer offset fpor older themes
    
    fixes T8622
    
    so due rto optimizations in edje it no longer moves/resizes invsible
    parts, so swallow a rect and it wont have moved if it is not visible
    thus tracking its geometry by getting the geometry of the swallowed
    part only works if its visible, so get the part geom from edje instead
    which has to give the calculated geom.
---
 src/bin/e_pointer.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c
index 61743a2cf..eca3afb7d 100644
--- a/src/bin/e_pointer.c
+++ b/src/bin/e_pointer.c
@@ -225,8 +225,8 @@ _e_pointer_cb_hot_move(void *data, Evas *evas EINA_UNUSED, 
Evas_Object *obj EINA
 
    if (!ptr->e_cursor) return;
    if (!evas_object_visible_get(ptr->o_ptr)) return;
-   evas_object_geometry_get(ptr->buffer_o_hot,
-                            &x, &y, NULL, NULL);
+   edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
+                                 &x, &y, NULL, NULL);
    _e_pointer_hot_update(ptr, x, y);
 }
 
@@ -237,8 +237,8 @@ _e_pointer_cb_hot_show(void *data, Evas *evas EINA_UNUSED, 
Evas_Object *obj EINA
    int x = 0, y = 0;
 
    if (!ptr->e_cursor) return;
-   evas_object_geometry_get(ptr->buffer_o_hot,
-                            &x, &y, NULL, NULL);
+   edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
+                                 &x, &y, NULL, NULL);
    _e_pointer_hot_update(ptr, x, y);
 }
 
@@ -477,8 +477,8 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
         _e_pointer_x11_setup(ptr, cursor);
         if (!cursor[0]) return;
 
-        evas_object_geometry_get(ptr->buffer_o_hot,
-                                 &x, &y, NULL, NULL);
+        edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
+                                      &x, &y, NULL, NULL);
         _e_pointer_hot_update(ptr, x, y);
 
         if (ptr->canvas)
@@ -783,6 +783,7 @@ e_pointer_idler_before(void)
 #ifndef HAVE_WAYLAND_ONLY
                   Ecore_X_Cursor cur;
 
+                  printf("update cursor hot %i %i\n", ptr->hot.x, ptr->hot.y);
                   cur = ecore_x_cursor_new(ptr->win, ptr->pixels, ptr->w, 
                                            ptr->h, ptr->hot.x, ptr->hot.y);
                   ecore_x_window_cursor_set(ptr->win, cur);
@@ -830,6 +831,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int 
x, int y)
    else if ((o != ptr->o_ptr) || (x != px) || (y != py))
      {
         ecore_evas_cursor_unset(ptr->ee);
+        printf("ecore_evas_obj ptr hot %i %i\n", ptr->hot.x, ptr->hot.y);
         ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, E_LAYER_MAX - 1, 
ptr->hot.x, ptr->hot.y);
         evas_object_show(ptr->o_ptr);
      }

-- 


Reply via email to