forked from enlightenment/enlightenment
correctly handle xdg surface deletion and pointer clearing
fixes crashing/leaking when deleting surfaces
This commit is contained in:
parent
19a902ec09
commit
2a9d4e73c5
|
@ -24,20 +24,16 @@ e_shell_surface_destroy(struct wl_resource *resource)
|
|||
ec->comp_data->grab = 0;
|
||||
}
|
||||
|
||||
shd = ec->comp_data->shell.data;
|
||||
|
||||
if (resource == ec->comp_data->shell.surface)
|
||||
ec->comp_data->shell.surface = NULL;
|
||||
shd = ec->comp_data->shell.data;
|
||||
if (shd)
|
||||
{
|
||||
E_FREE_LIST(shd->pending, free);
|
||||
if ((resource == ec->comp_data->shell.surface) || (resource == shd->surface))
|
||||
{
|
||||
if (ec->comp_data->shell.surface == resource)
|
||||
ec->comp_data->shell.surface = NULL;
|
||||
else
|
||||
shd->surface = NULL;
|
||||
if (resource == shd->surface)
|
||||
E_FREE(ec->comp_data->shell.data);
|
||||
}
|
||||
}
|
||||
|
||||
if (ec->comp_data->mapped)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue