Wayland Programming.

Pekka Paalanen ppaalanen at gmail.com
Thu Oct 15 00:19:38 PDT 2015


On Thu, 15 Oct 2015 10:15:03 +0300
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Wed, 14 Oct 2015 13:20:30 -0700
> <admin at ragmail.ca> wrote:
> 
> > 
> > I was looking at your blog.
> > 
> > Some people are claiming that you have to create a wl_buffer before a
> > wl_surface.
> > Some people are claiming that you don't have to create a wl_buffer at
> > all.
> > 
> > Do you know what's going on?
> > 
> > How do you create a wl_surface?
> > 
> 
> Hi,
> 
> first, let's put this on the proper mailing list for everyone's benefit.
> 
> You create a wl_surface with the wl_compositor.create_surface request.
> That is all. Only the wl_compositor is required, nothing else.
> 
> Of course, such a wl_surface will be useless until you do two more
> things:
> - give it a role
> - give it content (create a wl_buffer, fill it with data, and
>   wl_surface.damage+attach+commit it)
> Only after these you may see something on the screen.
> 
> Refer to
> http://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
> for how to do things after you created a wl_surface.
> 
> There is no difference in which you create first, a wl_surface or a
> wl_buffer.

Oh, I should add that you may not know what size of a wl_buffer to
create until you have created the wl_surface and given it a role.
Certain role specific actions trigger the server to tell you what size
you should or must use.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151015/248e5bc6/attachment.sig>


More information about the wayland-devel mailing list