<div dir="ltr">Hi,<br><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 29 May 2014 13:59, Philip Rushik <span dir="ltr"><<a href="mailto:prushik@gmail.com" target="_blank">prushik@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><br><div class="gmail_quote">On Thu, May 29, 2014 at 8:02 PM, Marek Chalupa <span dir="ltr"><<a href="mailto:mchqwerty@gmail.com" target="_blank">mchqwerty@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>try to look at weston/tests/weston-test-client-helpers.c on the function client_create(). That could be the piece of code your'e looking for.<br>



<br></div>Regards,<br>Marek<br>
</div><div class="gmail_extra"><br></div>
</blockquote></div><br></div></div><div>Hi, thanks for the reply,<br></div><div><br>I checked out that file, but I didn't see anything in it that shed new light on the problem. Seemed more or less to be the same code that is in weston/clients/simple-shm.c<br>



<br></div>I think the part of the code that I am missing is this:<br>        if (display->shell) {<br>                window->xdg_surface =<br>                        xdg_shell_get_xdg_surface(display->shell,<br>



                                                  window->surface);<br><br>                assert(window->xdg_surface);<br><br>                xdg_surface_add_listener(window->xdg_surface,<br>                                         &xdg_surface_listener, window);<br>



<br>                xdg_surface_set_title(window->xdg_surface, "simple-shm");<br>        } else if (display->fshell) {<br>                _wl_fullscreen_shell_present_surface(display->fshell,<br>                                                     window->surface,<br>



                                                     _WL_FULLSCREEN_SHELL_PRESE$<br>                                                     NULL);<br>        } else {<br>                assert(0);<br>        }<br><br></div>


xdg_surface________ stuff is not part of libwayland-client and I don't really fully understand what is supposed to be happening here.<br>
</div>Also, _wl_fullscreen_shell_present_surface seems strange and is not exported by libwayland-client, and if the example code doesn't use either of those it has to quit. </div></blockquote><div><br></div><div>These protocols are not a part of libwayland, but Weston. You can find their specification in weston/protocol directory (those xml files) and you can generate sources from them using wayland-scanner. Then you can link against these sources (namely xdg-shell-protocol.c for xdg_* stuff and fullscreen-shell-procotol.c for the another). But as far as I know, the common wl_surface should be enough for creating a window without borders and buttons in Weston (that's how the weston/tests/weston-test-client-helpers.c works). So if you want to use only libwayland-client, as you wrote before, you should not use xdg_shell and fullscreen_shell. What you need to do is:<br>
<br></div><div>(connect to display and get registry)<br></div><div>1. bind to compositor<br></div><div>2. create surface from compositor<br></div><div>3. create shm buffer<br></div><div>4. set buffer's contents<br></div>
<div>5. attach the buffer to surface<br></div><div>6. commit the surface<br></div><div></div><div><br></div><div>Hmm, I hope I didn't forget something xD<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><br></div><div class="gmail_extra">


So I still cant figure out what my code should do here.<br><br></div><div class="gmail_extra">Regards,<br></div><div class="gmail_extra">--Philip<br></div></div></blockquote><div><br></div><div>Marek <br></div></div><br>
</div></div></div></div>