diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 58c940e9a..deaa6f404 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -369,15 +369,6 @@ _e_comp_wl_send_mouse_move(E_Client *ec, int x, int y, unsigned int timestamp) wl_fixed_from_int(x - ec->client.x), wl_fixed_from_int(y - ec->client.y)); } - - EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res) - { - if (!e_comp_wl_input_touch_check(res)) continue; - if (wl_resource_get_client(res) != wc) continue; - wl_touch_send_motion(res, timestamp, 1, - wl_fixed_from_int(x - ec->client.x), - wl_fixed_from_int(y - ec->client.y)); - } } static void @@ -404,7 +395,6 @@ _e_comp_wl_evas_cb_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *o Evas_Event_Mouse_Down *ev = event; e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - ev->canvas.x, ev->canvas.y, WL_POINTER_BUTTON_STATE_PRESSED); } @@ -415,7 +405,6 @@ _e_comp_wl_evas_cb_mouse_up(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj Evas_Event_Mouse_Up *ev = event; e_comp_wl_evas_handle_mouse_button(ec, ev->timestamp, ev->button, - ev->canvas.x, ev->canvas.y, WL_POINTER_BUTTON_STATE_RELEASED); } @@ -1354,6 +1343,7 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state) _e_comp_wl_surface_state_buffer_set(state, NULL); + if (ec->comp_data->shell.surface) { if (ec->comp_data->shell.set.min_size.w) @@ -3327,7 +3317,7 @@ e_comp_wl_key_up(Ecore_Event_Key *ev) } E_API Eina_Bool -e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, int x, int y, uint32_t state) +e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state) { Eina_List *l; struct wl_client *wc; @@ -3378,6 +3368,9 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t bu if (!ec->comp_data->surface) return EINA_FALSE; + if (!eina_list_count(e_comp_wl->ptr.resources)) + return EINA_TRUE; + wc = wl_resource_get_client(ec->comp_data->surface); *state_serial = serial = wl_display_next_serial(e_comp_wl->wl.disp); @@ -3387,20 +3380,6 @@ e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t bu if (!e_comp_wl_input_pointer_check(res)) continue; wl_pointer_send_button(res, serial, timestamp, btn, state); } - - EINA_LIST_FOREACH(e_comp_wl->touch.resources, l, res) - { - if (wl_resource_get_client(res) != wc) continue; - if (!e_comp_wl_input_touch_check(res)) continue; - if (state == WL_POINTER_BUTTON_STATE_PRESSED) - wl_touch_send_down(res, serial, timestamp, - ec->comp_data->surface, 0, - wl_fixed_from_int(x - ec->client.x), - wl_fixed_from_int(y - ec->client.y)); - else - wl_touch_send_up(res, serial, timestamp, 0); - } - return EINA_TRUE; } diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index ca8164859..a78f5cd0c 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -381,7 +381,7 @@ E_API void e_comp_wl_output_remove(const char *id); EINTERN Eina_Bool e_comp_wl_key_down(Ecore_Event_Key *ev); EINTERN Eina_Bool e_comp_wl_key_up(Ecore_Event_Key *ev); -E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, int x, int y, uint32_t state); +E_API Eina_Bool e_comp_wl_evas_handle_mouse_button(E_Client *ec, uint32_t timestamp, uint32_t button_id, uint32_t state); E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD; diff --git a/src/modules/xwayland/dnd.c b/src/modules/xwayland/dnd.c index 56b1fbaf7..47c5d9569 100644 --- a/src/modules/xwayland/dnd.c +++ b/src/modules/xwayland/dnd.c @@ -93,11 +93,9 @@ _xwayland_drop(E_Drag *drag, int dropped) if (e_comp->comp_type != E_PIXMAP_TYPE_WL) return; e_comp_wl->drag = NULL; if ((!e_comp_wl->ptr.ec) || - (wl_resource_get_client(e_comp_wl->ptr.ec->comp_data->surface) != e_comp_wl->xwl_client)) + (wl_resource_get_client(e_comp_wl->ptr.ec->comp_data->surface) != e_comp_wl->xwl_client)) e_comp_wl_evas_handle_mouse_button(e_comp_wl->drag_client, 0, - e_comp_wl->ptr.button, - e_comp_wl->ptr.x, e_comp_wl->ptr.y, - WL_POINTER_BUTTON_STATE_RELEASED); + e_comp_wl->ptr.button, WL_POINTER_BUTTON_STATE_RELEASED); if (dropped || e_object_is_del(E_OBJECT(drag)) || (!e_comp_wl->selection.target)) _xdnd_finish(0); else