static void _e_comp_wl_subsurface_show(E_Client *ec);
static void _e_comp_wl_subsurface_hide(E_Client *ec);
+static E_Client * _e_comp_wl_client_usable_get(pid_t pid, E_Pixmap *ep);
+
/* local variables */
typedef struct _E_Comp_Wl_Transform_Context
{
DBG("\tUsing Pixmap: %p", ep);
- ec = e_client_new(ep, 0, internal);
+ if (!(ec = _e_comp_wl_client_usable_get(pid, ep)))
+ {
+ ec = e_client_new(ep, 0, internal);
+ }
}
if (ec)
{
e_client_uniconify(subc);
}
+static E_Client *
+_e_comp_wl_client_usable_get(pid_t pid, E_Pixmap *ep)
+{
+ /* NOTE: this will return usable E_Client for a surface of specified process
+ * by pid. it doesn't care whatever this surfaces is for but care only what
+ * is owner process of the surface.
+ */
+
+ E_Client *ec = NULL, *_ec = NULL;
+ Eina_List *l;
+
+ /* 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;
+
+ e_comp->launchscrns = eina_list_remove(e_comp->launchscrns, ec);
+
+ oldep = e_client_pixmap_change(ec, ep);
+ if (oldep)
+ {
+ e_pixmap_del(oldep);
+ e_pixmap_free(oldep);
+ }
+
+ if (ec->internal)
+ ec->internal = 0;
+
+ /* to set-up comp data */
+ _e_comp_wl_client_cb_new(NULL, ec);
+ _e_comp_wl_client_evas_init(ec);
+ }
+ }
+
+ return ec;
+}
+
static void
_e_comp_wl_cb_output_unbind(struct wl_resource *resource)
{
/* map this surface if needed */
if ((!ec->comp_data->mapped) && (e_pixmap_usable_get(ec->pixmap)))
{
+ /* unset previous content */
+ e_comp_object_content_unset(ec->frame);
+
ec->visible = EINA_TRUE;
evas_object_geometry_set(ec->frame, ec->x, ec->y, ec->w, ec->h);
evas_object_show(ec->frame);
(unsigned int)e_client_util_win_get(ec),
ec->w, ec->h);
+ /* unset previous content */
+ e_comp_object_content_unset(ec->frame);
+
/* map this surface if needed */
ec->visible = EINA_TRUE;
evas_object_show(ec->frame);
(unsigned int)e_client_util_win_get(ec),
ec->w, ec->h);
+ /* unset previous content */
+ e_comp_object_content_unset(ec->frame);
+
/* map this surface if needed */
ec->visible = EINA_TRUE;
evas_object_show(ec->frame);