e_pointer: set e_pointer's object only when object is changed 64/282764/3
authorduna.oh <duna.oh@samsung.com>
Tue, 11 Oct 2022 01:06:54 +0000 (10:06 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 11 Oct 2022 08:18:18 +0000 (08:18 +0000)
Change-Id: I050179a6450b831507b8176b5c4362cf1cfd691a

src/bin/e_pointer.c

index 33a610fe64ed5bf89a7274782a16a53ca5733e6d..17759eaf1c6b4c465df1082eebb24876709717cc 100644 (file)
@@ -263,7 +263,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
      }
 
    /* hide and unset the existed ptr->o_ptr */
-   if (ptr->o_ptr)
+   if (ptr->o_ptr && (ptr->o_ptr != obj))
      {
         ec = e_comp_object_client_get(ptr->o_ptr);
         if ((ec) && (!e_object_is_del(E_OBJECT(ec))))
@@ -275,8 +275,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
              ec->override = 1; /* ignore the previous cursor_ec */
           }
 
-        if (ptr->o_ptr != obj)
-           ptr->hwc = EINA_FALSE;
+        ptr->hwc = EINA_FALSE;
 
         /* hide cursor object */
         if (evas_object_visible_get(ptr->o_ptr))
@@ -293,7 +292,7 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
    ptr->hot.y = y;
 
    /* if obj is not null, set the obj to ptr->o_ptr */
-   if (obj)
+   if (obj && (ptr->o_ptr != obj))
      {
         ec = e_comp_object_client_get(obj);
         if (ec && e_pixmap_usable_get(ec->pixmap))