[wlhax] Allowing null buffer attaches

Max Ihlenfeldt <mihlenfeldt@igalia.com>
Message ID
DKIM signature
Download raw message

Today I discovered wlhax and it seems like a really useful tool!

However, I noticed that it doesn't like when you try to attach a null 
buffer to a wl_surface. According to the Wayland specification, this is 
allowed ("If wl_surface.attach is sent with a NULL wl_buffer, the 
following wl_surface.commit will remove the surface content."). I think 
it should be not much work to fix this in wl_surface.go, but I'm not 
familiar with Go and I couldn't really understand the code.

Best regards
Message ID
<a430b04d-5cd3-e381-d955-5a94615c4f59@igalia.com> (view parent)
DKIM signature
Download raw message
Hi Max,

I just added initial handling of empty buffer attach. It clears the 
role of the object, but does not otherwise try to handle unmap 
correctly yet (e.g. unmap of subsurfaces).

wlhax sorely needs a refactor, especially in the xdg-shell handling 
which developed into a severe case of spaghetti...

Best regards,
Kenny Levinsen
Reply to thread Export thread (mbox)