forked from enlightenment/enlightenment
map/unmap surface in committing surface should be valid, only when buffer is newly attached. check if buffer is newly attached, when do map/unmap surface.
Summary: There is a case that client do commit twice after one wl_surface_attach. In this case, even if no buffer attached, unmapping the surface. Because server already clear the buffer in first commit. This patch fixes it. Reviewers: devilhorns, zmike, raster CC: cedric Differential Revision: https://phab.enlightenment.org/D1115
This commit is contained in:
parent
b9caebbf7b
commit
6a1ef8b846
|
@ -359,22 +359,25 @@ _e_comp_wl_surface_cb_commit(struct wl_client *client EINA_UNUSED, struct wl_res
|
|||
}
|
||||
}
|
||||
|
||||
if (!ec->wl_comp_data->pending.buffer)
|
||||
if (ec->wl_comp_data->pending.new_attach)
|
||||
{
|
||||
if (ec->wl_comp_data->mapped)
|
||||
if (!ec->wl_comp_data->pending.buffer)
|
||||
{
|
||||
if ((ec->wl_comp_data->shell.surface) &&
|
||||
(ec->wl_comp_data->shell.unmap))
|
||||
ec->wl_comp_data->shell.unmap(ec->wl_comp_data->shell.surface);
|
||||
if (ec->wl_comp_data->mapped)
|
||||
{
|
||||
if ((ec->wl_comp_data->shell.surface) &&
|
||||
(ec->wl_comp_data->shell.unmap))
|
||||
ec->wl_comp_data->shell.unmap(ec->wl_comp_data->shell.surface);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ec->wl_comp_data->mapped)
|
||||
else
|
||||
{
|
||||
if ((ec->wl_comp_data->shell.surface) &&
|
||||
(ec->wl_comp_data->shell.map))
|
||||
ec->wl_comp_data->shell.map(ec->wl_comp_data->shell.surface);
|
||||
if (!ec->wl_comp_data->mapped)
|
||||
{
|
||||
if ((ec->wl_comp_data->shell.surface) &&
|
||||
(ec->wl_comp_data->shell.map))
|
||||
ec->wl_comp_data->shell.map(ec->wl_comp_data->shell.surface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue