Unset external content of cursor comp object 99/125299/3
authorMinJeong Kim <minjjj.kim@samsung.com>
Fri, 14 Apr 2017 13:58:23 +0000 (22:58 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 21 Apr 2017 06:56:25 +0000 (15:56 +0900)
Change-Id: I20b3e84171763809e4f37759f550c6b836e78ff8
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_comp_object.c
src/bin/e_comp_wl_input.c

index e5927fb1ef1637f550f7764687a181f4b5ff6317..7656676856b7a2397f9abf7c94e3f03451bf17c7 100644 (file)
@@ -5107,6 +5107,17 @@ e_comp_object_content_unset(Evas_Object *obj)
      }
 
    cw->external_content = EINA_FALSE;
+   if (cw->ec->is_cursor)
+     {
+        int pw, ph;
+        DBG("%p is cursor surface..", cw->ec);
+        if (!e_pixmap_size_get(cw->ec->pixmap, &pw, &ph))
+          pw = ph = 1;
+        evas_object_resize(cw->ec->frame, pw, ph);
+        evas_object_hide(cw->ec->frame);
+        return EINA_TRUE;
+     }
+
 
    cw->content_type = E_COMP_OBJECT_CONTENT_TYPE_INT_IMAGE;
    cw->obj = evas_object_image_filled_add(e_comp->evas);
index f46b92a31c6fb22ebc3d5957a7984b3347bb583b..b8f0001680a7979524ad2a1c221c09f7a5905fce 100644 (file)
@@ -36,6 +36,9 @@ _e_comp_wl_input_pointer_map(struct wl_resource *resource)
    if (!(ec = wl_resource_get_user_data(resource))) return;
    if (e_object_is_del(E_OBJECT(ec))) return;
 
+   //if cursor ec have external content
+   e_comp_object_content_unset(ec->frame);
+
    if (!e_comp_wl->ptr.ec || !e_comp_wl->ptr.ec->comp_data || !e_comp_wl->ptr.ec->comp_data->surface) return;
    wc = wl_resource_get_client(resource);
    if (wc != wl_resource_get_client(e_comp_wl->ptr.ec->comp_data->surface)) return;