From: Duna Oh Date: Tue, 1 Sep 2015 01:44:04 +0000 (+0900) Subject: fixes sticky cursors X-Git-Tag: submit/tizen/20150902.122230^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5012e7aec771e71482436079f7fd43655b75eee0;p=platform%2Fupstream%2Fenlightenment.git fixes sticky cursors - Add inside_check condition when gets MOUSE_OUT event Even though ec->cur_mouse_action is not NULL, check if mouse is out of client and reset the cursor. - Remove check for ec->mouse.in when get cursor_set. ec->mouse.in could be FALSE when comp_grabbed is TRUE, then failed to set the client's cursor. - Show canvas cursor when reset the cursor Change-Id: I59430fd8c4d1b9fcd19dc6f92f00abb1156697b3 Signed-off-by: Duna Oh --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 15dd856258..f1c776d0cb 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -666,16 +666,22 @@ _e_comp_wl_evas_cb_mouse_in(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj } static void -_e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) +_e_comp_wl_evas_cb_mouse_out(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event) { E_Client *ec; + Evas_Event_Mouse_Out *ev; struct wl_resource *res; struct wl_client *wc; Eina_List *l; uint32_t serial; + Eina_Bool inside_check; + + ev = event; if (!(ec = data)) return; - if (ec->cur_mouse_action) return; + inside_check = E_INSIDE(ev->canvas.x, ev->canvas.y, + ec->client.x, ec->client.y, ec->client.w, ec->client.h); + if (ec->cur_mouse_action && inside_check) return; if (e_object_is_del(E_OBJECT(e_comp))) return; /* FIXME? this is a hack to just reset the cursor whenever we mouse out. not sure if accurate */ { diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index f99c3c7316..b6e611d865 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -70,11 +70,8 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou { if (!ec->comp_data->surface) continue; if (client != wl_resource_get_client(ec->comp_data->surface)) continue; - if (ec->mouse.in) - { - got_mouse = EINA_TRUE; - break; - } + got_mouse = EINA_TRUE; + break; } if (!got_mouse) return; if (!surface_resource) diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c index 6ebecbe860..e21b6e0c33 100644 --- a/src/bin/e_pointer.c +++ b/src/bin/e_pointer.c @@ -787,5 +787,8 @@ e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y) ecore_evas_object_cursor_set(ptr->ee, obj, EVAS_LAYER_MAX, x, y); } else - ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y); + { + ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y); + evas_object_show(ptr->o_ptr); + } }