From 64dce95bf123a3eba95ce0dd39ff5408e1aef99a Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Mon, 29 Jul 2024 10:45:58 +0900 Subject: [PATCH] e_compositor: Use e_comp_launchscrn APIs Change-Id: I68124852bd100d32711bf17ebfbcb41ff6e8f03d --- src/bin/server/e_compositor.c | 64 ++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 38 deletions(-) diff --git a/src/bin/server/e_compositor.c b/src/bin/server/e_compositor.c index 66fb454..b846b48 100644 --- a/src/bin/server/e_compositor.c +++ b/src/bin/server/e_compositor.c @@ -682,52 +682,40 @@ _e_comp_wl_client_usable_get(pid_t pid, E_Pixmap *ep) * is owner process of the surface. */ - E_Client *ec = NULL, *_ec = NULL; - Eina_List *l; + E_Client *ec; + E_Pixmap *oldep; /* find launchscreen client list */ - if (e_comp->launchscrns) - { - EINA_LIST_FOREACH(e_comp->launchscrns, l, _ec) - { - if (_ec->netwm.pid == pid) - { - ec = _ec; - break; - } - } - if (ec) - { - E_Pixmap *oldep = NULL; + ec = e_comp_launchscrn_ec_find_by_pid(pid); + if (!ec) + return NULL; - if (ec->comp_data) - { - /* do NOT replace with the client having comp data */ - return NULL; - } + if (ec->comp_data) + { + /* do NOT replace with the client having comp data */ + return NULL; + } - e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, ec); + e_comp_launchscrn_ec_remove(ec); - oldep = e_client_pixmap_change(ec, ep); - if (oldep) - { - e_pixmap_win_id_del(oldep); - e_pixmap_free(oldep); - } + oldep = e_client_pixmap_change(ec, ep); + if (oldep) + { + e_pixmap_win_id_del(oldep); + e_pixmap_free(oldep); + } - if (ec->internal) - ec->internal = 0; + if (ec->internal) + ec->internal = 0; - /* to set-up comp data */ - _e_compositor_cb_new_client(NULL, ec); - ec->ignored = 0; - if (!ec->comp_data) return NULL; - e_comp_wl_client_evas_init(ec); + /* to set-up comp data */ + _e_compositor_cb_new_client(NULL, ec); + ec->ignored = 0; + if (!ec->comp_data) return NULL; + e_comp_wl_client_evas_init(ec); - ELOGF("COMP", "Reusable ec. new_pixmap:%p", ec, ec->pixmap); - e_comp_wl_hook_call(E_COMP_WL_HOOK_CLIENT_REUSE, ec); - } - } + ELOGF("COMP", "Reusable ec. new_pixmap:%p", ec, ec->pixmap); + e_comp_wl_hook_call(E_COMP_WL_HOOK_CLIENT_REUSE, ec); return ec; } -- 2.7.4