Re: [PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-20 Thread Axel Davy
Hi, I've checked how it would behave when X closes properly, and I think xwl_screen_close would need a new flush after the roundtrip: . first flush: the server knows the wl_surface was destroyed . dispatch: X gets the release . missing flush: the server knows the wl_buffer has been destroyed. Mo

Re: [PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-20 Thread Pekka Paalanen
On Thu, 20 Feb 2014 11:43:05 +0100 Rui Matos wrote: > Destroying a wl_buffer that is still attached to a wl_surface is > undefined behavior according to the wayland protocol. We should delay > the destruction until we get the release event. > > To achieve this we need to track ownership of wl_bu

[PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-20 Thread Rui Matos
Destroying a wl_buffer that is still attached to a wl_surface is undefined behavior according to the wayland protocol. We should delay the destruction until we get the release event. To achieve this we need to track ownership of wl_buffers, both our own and the compositor's which occurs from eithe

Re: [PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-11 Thread Pekka Paalanen
On Tue, 11 Feb 2014 16:34:13 +0100 Rui Matos wrote: > Destroying a wl_buffer that is still attached to a wl_surface is > undefined behavior according to the wayland protocol. We should delay > the destruction until we get the release event. > --- > > So, I'm not sure why there was this comment s

Re: [PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-11 Thread Rui Tiago Cação Matos
On 11 February 2014 16:44, Axel Davy wrote: > I have pending changes to this part to implement XWayland present support. > > Instead a having the wl_buffer attached to a window, I attach it to a > pixmap. > > Could you test with this branch, and tell if you encounter the problems you > have? > > h

Re: [PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-11 Thread Axel Davy
Hi, I have pending changes to this part to implement XWayland present support. Instead a having the wl_buffer attached to a window, I attach it to a pixmap. Could you test with this branch, and tell if you encounter the problems you have? https://github.com/axeldavy/xserver/tree/xwayland-d

[PATCH] xwayland: Destroy wl_buffers only after they are released

2014-02-11 Thread Rui Matos
Destroying a wl_buffer that is still attached to a wl_surface is undefined behavior according to the wayland protocol. We should delay the destruction until we get the release event. --- So, I'm not sure why there was this comment saying that it was safe to do this, perhaps it was in an old protoc