From: Duna Oh Date: Fri, 25 Mar 2016 09:51:39 +0000 (+0900) Subject: e_comp_wl: use ecore_device of ecore_event when gets key_down/up X-Git-Tag: submit/tizen/20160406.100414~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=674d67a11a5f652fbfa2632f2809d4f1fb06830c;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl: use ecore_device of ecore_event when gets key_down/up Signed-off-by: Duna Oh Change-Id: I8477bb27e487b34894813f3883880919b079c935 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index ee16b17c74..7f1dfdc57c 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -749,6 +749,10 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj e_comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec); } + if ((e_comp_wl->input_device_manager.last_device_name) && + (_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_MOUSE)) + _e_comp_wl_device_send_last_event_device(ec, ev->timestamp); + if (!eina_list_count(e_comp_wl->ptr.resources)) return; wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp); @@ -761,10 +765,6 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj wl_fixed_from_int(ev->canvas.x - ec->client.x), wl_fixed_from_int(ev->canvas.y - ec->client.y)); } - - if ((e_comp_wl->input_device_manager.last_device_name) && - (_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_MOUSE)) - _e_comp_wl_device_send_last_event_device(ec, ev->timestamp); } static void @@ -4779,9 +4779,14 @@ e_comp_wl_key_down(Ecore_Event_Key *ev) { struct wl_resource *res; Eina_List *l; + const char *name; - if (ev->dev_name) - _e_comp_wl_device_send_event_device(ev->dev_name, EVAS_DEVICE_CLASS_KEYBOARD, ec, ev->timestamp); + if (ev->dev) + { + name = ecore_device_identifier_get(ev->dev); + if (name) + _e_comp_wl_device_send_event_device(name, EVAS_DEVICE_CLASS_KEYBOARD, ec, ev->timestamp); + } serial = wl_display_next_serial(e_comp_wl->wl.disp); EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res) @@ -4854,8 +4859,14 @@ e_comp_wl_key_up(Ecore_Event_Key *ev) if (e_comp_wl->kbd.focused) { - if (ev->dev_name) - _e_comp_wl_device_send_event_device(ev->dev_name, EVAS_DEVICE_CLASS_KEYBOARD, ec, ev->timestamp); + const char *name; + + if (ev->dev) + { + name = ecore_device_identifier_get(ev->dev); + if (name) + _e_comp_wl_device_send_event_device(name, EVAS_DEVICE_CLASS_KEYBOARD, ec, ev->timestamp); + } serial = wl_display_next_serial(e_comp_wl->wl.disp); EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)