Jasper St. Pierre 57359da9b4 wayland: Kill the buffer destroy error
Previously, a sequence like this would crash a client:

  => surface.attach(buffer)
  => buffer.destroy()

The correct behavior is to wait until we release the buffer before
destroying it.

  => surface.attach(buffer)
  => surface.attach(buffer2)
  <= buffer.release()
  => buffer.destroy()

The protocol upstream says that "the surface contents are undefined"
in a case like this. Personally, I think that this is broken behavior
and no client should ever do it, so I explicitly killed any client
that tried to do this.

But unfortunately, as we're all well aware, XWayland does this.
Rather than wait for XWayland to be fixed, let's just allow this.

Technically, since we always copy SHM buffers into GL textures, we
could release the buffer as soon as the Cogl texture is made.

Since we do this copy, the semantics we apply are that the texture is
"frozen" in time until another newer buffer is attached. For simple
clients that simply abort on exit and don't wait for the buffer event
anyhow, this has the added bonus that we'll get nice destroy animations.
2014-03-20 13:53:05 -04:00
2014-03-19 21:09:02 +01:00
2014-03-18 20:37:35 -04:00
2014-03-18 20:37:35 -04:00
2014-03-18 22:08:04 -04:00
2014-03-19 21:22:46 +01:00
2014-03-19 21:22:46 +01:00
Description
91 MiB
Languages
C 98.9%
Meson 0.7%
Python 0.3%