From: jeon Date: Tue, 25 Feb 2020 10:09:45 +0000 (+0900) Subject: e_comp_wl: set a pointer object after wl_surface commit is came X-Git-Tag: submit/tizen/20200227.111751~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a572c2e866f0621eefded6b90ecaa3bf8afa8e06;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl: set a pointer object after wl_surface commit is came Change-Id: I4e4ac659bea2b3b9ac0ea401d465ec754a2cc726 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index bf2e23fb40..b09ca650e0 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -4313,6 +4313,7 @@ E_API Eina_Bool e_comp_wl_surface_commit(E_Client *ec) { Eina_Bool ignored; + int x = 0, y = 0; _e_comp_wl_surface_state_commit(ec, &ec->comp_data->pending); if (!e_comp_object_damage_exists(ec->frame)) @@ -4381,6 +4382,20 @@ e_comp_wl_surface_commit(E_Client *ec) evas_object_show(ec->comp_data->sub.below_obj); } ec->ignored = ignored; + + if (ec->is_cursor && ec->visible) + { + /* ignore cursor changes during resize/move I guess */ + if (!e_client_action_get()) + { + if (e_comp->pointer) + { + x = e_comp->pointer->hot.x; + y = e_comp->pointer->hot.y; + } + e_pointer_object_set(e_comp->pointer, ec->frame, x, y); + } + } return EINA_TRUE; } diff --git a/src/bin/e_comp_wl_input.c b/src/bin/e_comp_wl_input.c index 86fc79cada..4121660616 100644 --- a/src/bin/e_comp_wl_input.c +++ b/src/bin/e_comp_wl_input.c @@ -127,9 +127,22 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou ec->is_cursor = EINA_TRUE; } + /* Set a pointer_object after wl_surface commit + * if cursor image is changed, + * changed information is sent using attach / damage + * So in commit, we can know real current cursor image. + */ +#if 0 /* ignore cursor changes during resize/move I guess */ if (e_client_action_get()) return; e_pointer_object_set(e_comp->pointer, ec->frame, x, y); +#endif + if (e_comp->pointer) + { + e_comp->pointer->hot.x = x; + e_comp->pointer->hot.y = y; + ec->visible = EINA_TRUE; + } } static const struct wl_pointer_interface _e_pointer_interface =