[question] Documentation for writing a weston shell?

Leon Plickat leonhenrik.plickat at stud.uni-goettingen.de
Sun Jun 9 14:33:28 UTC 2019


I am interested in creating a wayland desktop by writing a shell for weston. I
have however not found any documentations about this and I hope this is the
correct place to ask a few questions.

'notes.txt' as well as weston(1) mention weston shells consisting of two part:
A plugin and a client. Looking at the code of the provided example shells the
client is apparently  launched by the plugin. The plugin simply provides
functions for the function-pointers from 'struct weston_desktop_api' in
'libweston-desktop.h' while the client is a mostly self-contained program. I
believe the plugin is responsible for the window management, handling keybinds
and launching the client, while the client draws UI elements such as panels or
buttons and creates a background surface (and therefore also sets the wallpaper)
which will then be handled by the plugin.

Are these assumptions correct? And what is the exact purpose of the plugin and
the client? What should the functions for 'struct weston_desktop_api' do and can
I omit certain things (like for example minimising a window) simply by providing
the function-pointer with a no-op function? What are the limitations of a weston
shell? I want to create a desktop with automatic layouts, simple window
decorations and a panel. I think the window decoration seen when using the
provided example tools are not drawn by the shell, as I have not found any code
for this and also some of the examples do not have window decorations at all.
Can a shell actually provide window decoration or are they client side only?
And what is the best way for the two parts of a shell to communicate with each
other, so that one can, as an example, click on a button on the panel (handled
by the client) and the shell changes the window layout (handled by the plugin),
similar to the ivi-shell example? And are there any helper functions I can use,
for example to get a list of all connected clients, or will I have to track
something like that myself?

I am used to Xlib programming, however from what I have seen of weston I doubt I
can understand how to implement a shell only by looking at the code. Again, I
hope this is the right place to ask these questions.


friendly greetings,
Leon Plickat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20190609/dd55e8e5/attachment.sig>


More information about the wayland-devel mailing list