forked from enlightenment/enlightenment
clean up xwl data on client deletion
remove the extra comp_data, the pending client list entry, and the pixmap ref
This commit is contained in:
parent
6d030b1c32
commit
cca2363c7c
|
@ -322,9 +322,13 @@ e_comp_wl_client_xwayland_pixmap(const E_Client *ec)
|
|||
static inline void
|
||||
e_comp_wl_client_xwayland_setup(E_Client *ec, E_Comp_X_Client_Data *cd, E_Pixmap *ep)
|
||||
{
|
||||
((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_data = cd;
|
||||
((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_pixmap = ep;
|
||||
e_comp->wl_comp_data->xwl_pending = eina_list_remove(e_comp->wl_comp_data->xwl_pending, ec);
|
||||
if (cd && ep)
|
||||
{
|
||||
((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_data = cd;
|
||||
((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_pixmap = ep;
|
||||
}
|
||||
if (e_comp->wl_comp_data->xwl_pending)
|
||||
e_comp->wl_comp_data->xwl_pending = eina_list_remove(e_comp->wl_comp_data->xwl_pending, ec);
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
|
|
@ -4366,6 +4366,15 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client *ec)
|
|||
}
|
||||
if (cd)
|
||||
E_FREE_FUNC(cd->first_draw_delay, ecore_timer_del);
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (e_pixmap_is_x(ec->pixmap))
|
||||
e_comp_wl_client_xwayland_setup(ec, NULL, NULL);
|
||||
else
|
||||
{
|
||||
free(cd);
|
||||
e_pixmap_free(_e_comp_x_client_pixmap_get(ec));
|
||||
}
|
||||
#endif
|
||||
if (post_clients)
|
||||
post_clients = eina_list_remove(post_clients, ec);
|
||||
|
||||
|
|
Loading…
Reference in New Issue