diff --git a/legacy/elementary/src/bin/test_win_plug.c b/legacy/elementary/src/bin/test_win_plug.c index 4826c92f8e..cad799359c 100644 --- a/legacy/elementary/src/bin/test_win_plug.c +++ b/legacy/elementary/src/bin/test_win_plug.c @@ -5,6 +5,14 @@ #ifndef ELM_LIB_QUICKLAUNCH +static void +cb_mouse_down(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info) +{ + Evas_Event_Mouse_Down *ev = event_info; + + if (ev->button == 1) elm_object_focus_set(obj, EINA_TRUE); +} + static void cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info) { @@ -90,6 +98,7 @@ test_win_plug(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in evas_object_show(bg); plug = elm_plug_add(win); + evas_object_event_callback_add(elm_plug_image_object_get(plug), EVAS_CALLBACK_MOUSE_DOWN, cb_mouse_down, NULL); if (!elm_plug_connect(plug, "ello", 0, EINA_FALSE)) { printf("Cannot connect plug\n");