From 0fe553cf06a328ac589a1494cd24e420b494b985 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 6 Jul 2018 10:16:36 -0400 Subject: [PATCH] ecore_wl2: Remove ecore_wl2_display_window_find Summary: This is now totally trivial and needs not exist. Depends on D6522 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6523 --- src/lib/ecore_wl2/Ecore_Wl2.h | 13 ------------- src/lib/ecore_wl2/ecore_wl2_display.c | 6 ------ src/lib/elementary/efl_selection_manager.c | 15 +++++---------- .../engines/wayland/ecore_evas_wayland_common.c | 6 +----- src/modules/ecore_imf/wayland/wayland_imcontext.c | 3 +-- 5 files changed, 7 insertions(+), 36 deletions(-) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 00cf2f79b4..bbc7e1ccac 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -671,19 +671,6 @@ EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find(const Ecore_Wl2_Display *disp */ EAPI Ecore_Wl2_Input *ecore_wl2_display_input_find_by_name(const Ecore_Wl2_Display *display, const char *name); -/** - * Find an Ecore_Wl2_Window based on id - * - * @param display The display to search for the window - * @param id The id of the window to find - * - * @return The Ecore_Wl2_Window if found, or NULL if no such window exists - * - * @ingroup Ecore_Wl2_Display_Group - * @since 1.17 - */ -EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find(Ecore_Wl2_Display *display, uintptr_t id); - /** * Retrieves the Wayland Registry used for the current Wayland display. * diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index e759e11ce1..54af642d8d 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -1083,12 +1083,6 @@ ecore_wl2_display_screen_size_get(Ecore_Wl2_Display *display, int *w, int *h) if (h) *h = oh; } -EAPI Ecore_Wl2_Window * -ecore_wl2_display_window_find(Ecore_Wl2_Display *display EINA_UNUSED, uintptr_t id) -{ - return (Ecore_Wl2_Window *)id; -} - EAPI struct wl_registry * ecore_wl2_display_registry_get(Ecore_Wl2_Display *display) { diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c index 0bd501e8fa..e59a7559ff 100644 --- a/src/lib/elementary/efl_selection_manager.c +++ b/src/lib/elementary/efl_selection_manager.c @@ -2964,15 +2964,13 @@ _wl_dropable_find(Efl_Selection_Manager_Data *pd, Ecore_Wl2_Window *win) { Eina_List *l; Sel_Manager_Dropable *dropable; - Ecore_Wl2_Window *window; if (!pd->drop_list) return NULL; - window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win); - if (!window) return NULL; + if (!win) return NULL; EINA_LIST_FOREACH(pd->drop_list, l, dropable) - if (_wl_window_get(dropable->obj) == window) + if (_wl_window_get(dropable->obj) == win) return dropable; return NULL; @@ -3372,14 +3370,12 @@ _wl_dropable_all_clean(Sel_Manager_Seat_Selection *seat_sel, Ecore_Wl2_Window *w { Eina_List *l; Sel_Manager_Dropable *dropable; - Ecore_Wl2_Window *window; - window = ecore_wl2_display_window_find(_elm_wl_display, (Ecore_Window)win); - if (!window) return; + if (!win) return; EINA_LIST_FOREACH(seat_sel->pd->drop_list, l, dropable) { - if (_wl_window_get(dropable->obj) == window) + if (_wl_window_get(dropable->obj) == win) { dropable->last.pos.x = 0; dropable->last.pos.y = 0; @@ -3718,8 +3714,7 @@ _wl_dnd_drop(void *data, int type EINA_UNUSED, void *event) } } - win = ecore_wl2_display_window_find(pd->wl_display, (Ecore_Window)ev->win); - ecore_wl2_dnd_drag_end(_wl_seat_get(win, NULL, seat_sel->seat)); + ecore_wl2_dnd_drag_end(_wl_seat_get(ev->win, NULL, seat_sel->seat)); return ECORE_CALLBACK_PASS_ON; } diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index a3c01bf509..15c275c8df 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -2508,11 +2508,7 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, i else ee->can_async_render = 1; - if (parent) - { - p = ecore_wl2_display_window_find(ewd, parent); - ee->alpha = ecore_wl2_window_alpha_get(p); - } + if (parent) ee->alpha = ecore_wl2_window_alpha_get((Ecore_Wl2_Window *)parent); wdata->sync_done = EINA_FALSE; wdata->parent = p; diff --git a/src/modules/ecore_imf/wayland/wayland_imcontext.c b/src/modules/ecore_imf/wayland/wayland_imcontext.c index 8dc905f22d..d7bcfe7994 100644 --- a/src/modules/ecore_imf/wayland/wayland_imcontext.c +++ b/src/modules/ecore_imf/wayland/wayland_imcontext.c @@ -906,8 +906,7 @@ wayland_im_context_client_window_set(Ecore_IMF_Context *ctx, void *window) if (window != NULL) { - imcontext->window = - ecore_wl2_display_window_find(ewd, (Ecore_Window)window); + imcontext->window = window; } }