Simple SHM Wayland Client

Philip Rushik prushik at gmail.com
Wed May 28 08:24:02 PDT 2014


Hi Everybody,

I am trying to build a simple Wayland client, just sort of a "hello world"
type deal right now. I want to avoid any OpenGL or external dependencies
other than libwayland-client itself.
All I want to do is be able to tell wayland to create a window, get myself
a framebuffer which I can write to, and have wayland display it.
So I think what I want is to use wayland with shm. I realize there is an
example of this in the weston source code, and I have been studying it
quite a lot as it seems to be the only example of a client using shm
available. However, I have a few issues with the example, it seems to use
functions that are not included in libwayland-client but instead part of
the weston source tree. Due to this, I have not even been able to compile
it successfully without compiling all of weston.
I tried writing my own program, and after a night of not sleeping and
wishing I could but debugging code the whole time, I got myself a program
that doesn't crash, but also doesn't display anything at all. I used the
example code in the weston source for reference, but I replaced or ignored
the parts which seemed to be using non-libwayland-client function. I used
shm_open instead of os_create_anonymous_file.

If somebody would be willing to lend a hand that would be great. My code is
about 150 SLOC at the moment, but I don't know if you would be happy with
me posting it all to the mailing list.
Also, if you know of any other examples of using wayland and shm that you
could point me to, that would be great.

Thanks
--Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140529/bc3233fb/attachment.html>


More information about the wayland-devel mailing list