raster pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=7d7c825ecd808fb4caccf13e23cc90a5c0d833e5

commit 7d7c825ecd808fb4caccf13e23cc90a5c0d833e5
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Jul 9 11:35:34 2021 +0100

    video smart - we dont need to handle the move func - smart clipped does
---
 src/bin/video.c | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/src/bin/video.c b/src/bin/video.c
index dc8fa30..25f6842 100644
--- a/src/bin/video.c
+++ b/src/bin/video.c
@@ -409,9 +409,9 @@ _smart_add(Evas_Object *obj)
    _parent_sc.add(obj);
 
    o = evas_object_rectangle_add(evas_object_evas_get(obj));
+   evas_object_color_set(o, 255, 255, 255, 255);
    evas_object_smart_member_add(o, obj);
    sd->clip = o;
-   evas_object_color_set(o, 255, 255, 255, 255);
 }
 
 static void
@@ -450,12 +450,11 @@ static void
 _smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
 {
    Video *sd = evas_object_smart_data_get(obj);
-   Evas_Coord ox, oy, ow, oh;
+   Evas_Coord ow, oh;
    if (!sd) return;
-   evas_object_geometry_get(obj, &ox, &oy, &ow, &oh);
+   evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
    if ((ow == w) && (oh == h)) return;
    evas_object_smart_changed(obj);
-   evas_object_resize(sd->clip, ow, oh);
 }
 
 static Eina_Bool
@@ -523,14 +522,6 @@ _smart_calculate(Evas_Object *obj)
    evas_object_resize(sd->clip, ow, oh);
 }
 
-static void
-_smart_move(Evas_Object *obj, Evas_Coord x EINA_UNUSED, Evas_Coord y 
EINA_UNUSED)
-{
-   Video *sd = evas_object_smart_data_get(obj);
-   if (!sd) return;
-   evas_object_smart_changed(obj);
-}
-
 static void
 _mouse_down_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, 
void *event)
 {
@@ -574,7 +565,6 @@ _smart_init(void)
    sc.add       = _smart_add;
    sc.del       = _smart_del;
    sc.resize    = _smart_resize;
-   sc.move      = _smart_move;
    sc.calculate = _smart_calculate;
    _smart = evas_smart_class_new(&sc);
 }

-- 


Reply via email to