From 044392a97f83f87490c42257c6a8b06473267053 Mon Sep 17 00:00:00 2001 From: Juyeon Lee Date: Fri, 10 Nov 2017 17:11:30 +0900 Subject: [PATCH] ecore_wl2: support tizen_effect_listener @tizen_feature Change-Id: I28e014ed935a6ae31aff63fc2bf0194cfa9ec3ee --- src/lib/ecore_wl2/ecore_wl2_display.c | 24 ++++++++++++++++++++++++ src/lib/elementary/efl_ui_win.c | 6 +++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 7c6544b..17a5821 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -400,11 +400,35 @@ static const struct tizen_policy_ext_listener _tizen_policy_ext_listener = static void _tizen_effect_cb_start(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type) { + struct wl_surface *surface = surface_resource; + Ecore_Wl2_Window *win = NULL; + Ecore_Wl2_Event_Effect_Start *ev; + + if (!surface) return; + win = ecore_wl2_window_surface_find(surface); + if (!win) return; + + if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Effect_Start)))) return; + ev->win = win->id; + ev->type = type; + ecore_event_add(ECORE_WL2_EVENT_EFFECT_START, ev, NULL, NULL); } static void _tizen_effect_cb_end(void *data EINA_UNUSED, struct tizen_effect *tizen_effect EINA_UNUSED, struct wl_surface *surface_resource, unsigned int type) { + struct wl_surface *surface = surface_resource; + Ecore_Wl2_Window *win = NULL; + Ecore_Wl2_Event_Effect_End *ev; + + if (!surface) return; + win = ecore_wl2_window_surface_find(surface); + if (!win) return; + + if (!(ev = calloc(1, sizeof(Ecore_Wl2_Event_Effect_End)))) return; + ev->win = win->id; + ev->type = type; + ecore_event_add(ECORE_WL2_EVENT_EFFECT_END, ev, NULL, NULL); } static const struct tizen_effect_listener _tizen_effect_listener = diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index df76348..8b85ac6 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -4325,7 +4325,7 @@ _elm_win_wl_effect_start(void *data, int type EINA_UNUSED, void *event) if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON; - if ((ecore_wl2_window_id_get(sd->wl.win) != e->win)) + if (ecore_wl2_window_id_get(sd->wl.win) != e->win) return ECORE_CALLBACK_PASS_ON; evas_object_smart_callback_call(data, SIG_EFFECT_STARTED, (void*)e->type); @@ -4342,10 +4342,10 @@ _elm_win_wl_effect_end(void *data, int type EINA_UNUSED, void *event) if (!sd->wl.win) return ECORE_CALLBACK_PASS_ON; - if ((ecore_wl2_window_id_get(sd->wl.win) != e->win)) + if (ecore_wl2_window_id_get(sd->wl.win) != e->win) return ECORE_CALLBACK_PASS_ON; - evas_object_smart_callback_call(data, SIG_EFFECT_DONE, (void*)e->type); + evas_object_smart_callback_call(data, SIG_EFFECT_DONE, (void*)e->type); return ECORE_CALLBACK_PASS_ON; } -- 2.7.4