From: jeon Date: Mon, 30 Dec 2019 06:21:14 +0000 (+0900) Subject: e_comp_wl: adjust mouse in pointer when reload the cursor X-Git-Tag: submit/tizen/20200103.060921~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e871cea6a3d43b42313bb639c43c9a53d6d5594e;p=platform%2Fupstream%2Fenlightenment.git e_comp_wl: adjust mouse in pointer when reload the cursor Change-Id: I1bccc7df04b4bde8de8eb69c8f9fd20ad9acbd40 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 376ba4e2a9..e656efb0c1 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -809,7 +809,7 @@ _e_comp_wl_cursor_reload(E_Client *ec) struct wl_client *wc; Eina_List *l; uint32_t serial; - int cx, cy; + int cx, cy, px, py; if (e_comp->pointer->o_ptr && (!evas_object_visible_get(e_comp->pointer->o_ptr))) e_pointer_object_set(e_comp->pointer, NULL, 0, 0); @@ -818,8 +818,19 @@ _e_comp_wl_cursor_reload(E_Client *ec) if (e_object_is_del(E_OBJECT(ec))) return; if (!ec->comp_data || !ec->comp_data->surface) return; - cx = wl_fixed_to_int(e_comp_wl->ptr.x) - ec->client.x; - cy = wl_fixed_to_int(e_comp_wl->ptr.y) - ec->client.y; + px = wl_fixed_to_int(e_comp_wl->ptr.x); + py = wl_fixed_to_int(e_comp_wl->ptr.y); + + if (evas_object_map_enable_get(ec->frame)) + { + double dx = 0.0, dy = 0.0; + evas_map_coords_get(evas_object_map_get(ec->frame), (double)px, (double)py, &dx, &dy, 0); + px = (int)dx; + py = (int)dy; + } + + cx = px - ec->client.x; + cy = py - ec->client.y; wc = wl_resource_get_client(ec->comp_data->surface); serial = wl_display_next_serial(e_comp_wl->wl.disp);