e_comp_wl: Evas_Event_Mouse_In event could be send by touch device. 30/65030/2 accepted/tizen/common/20160408.184808 accepted/tizen/ivi/20160407.110909 accepted/tizen/mobile/20160407.110814 accepted/tizen/tv/20160407.110836 accepted/tizen/wearable/20160407.110851 submit/tizen/20160407.042041
authorDuna Oh <duna.oh@samsung.com>
Thu, 7 Apr 2016 04:08:22 +0000 (13:08 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 7 Apr 2016 04:16:48 +0000 (21:16 -0700)
Signed-off-by: Duna Oh <duna.oh@samsung.com>
Change-Id: Idae92422ac92c4df25aed10d537006c0575d7fea

src/bin/e_comp_wl.c

index 5d157bd9d4682353af0c4dd6d70fdfa2e3b8aa80..859124840e7719aaee2c95e0fda0ddf4ed742325 100644 (file)
@@ -646,6 +646,7 @@ _e_comp_wl_device_send_last_event_device(E_Client *ec, uint32_t timestamp)
    Eina_List *l, *ll;
 
    if (!ec->comp_data->surface) return;
+   if (!e_comp_wl->input_device_manager.last_device_name) return;
 
    serial = wl_display_next_serial(e_comp_wl->wl.disp);
    wc = wl_resource_get_client(ec->comp_data->surface);
@@ -759,9 +760,9 @@ _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 ((_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_MOUSE) ||
+       (_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_TOUCH))
+     _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);
@@ -1349,8 +1350,7 @@ _e_comp_wl_evas_cb_focus_in_timer(E_Client *ec)
    if (!e_comp_wl->kbd.focused) return EINA_FALSE;
    serial = wl_display_next_serial(e_comp_wl->wl.disp);
    t = ecore_time_unix_get();
-   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_KEYBOARD))
+   if (_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_KEYBOARD)
      _e_comp_wl_device_send_last_event_device(ec, t);
 
    EINA_LIST_FOREACH(e_comp_wl->kbd.focused, l, res)
@@ -1422,8 +1422,7 @@ _e_comp_wl_evas_cb_focus_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *ob
    /* send keyboard_leave to all keyboard resources */
    serial = wl_display_next_serial(e_comp_wl->wl.disp);
    t = ecore_time_unix_get();
-   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_KEYBOARD))
+   if (_e_comp_wl_device_cap_to_class(e_comp_wl->input_device_manager.last_device_cap) == EVAS_DEVICE_CLASS_KEYBOARD)
      _e_comp_wl_device_send_last_event_device(ec, t);
 
    EINA_LIST_FOREACH_SAFE(e_comp_wl->kbd.focused, l, ll, res)