[writing a compositor] Displaying something on the screen

Quentin Glidic sardemff7+wayland at sardemff7.net
Thu May 31 09:05:30 UTC 2018


On 5/31/18 5:42 AM, adlo wrote:
> I am attempting to write a simple test compositor using libweston.
> Here is my code so far:
> https://github.com/adlocode/test-libweston-desktop
> What else do I need to do in order to get it to the point where something appears on the screen, such as a rectangle of solid colour?

For regular (desktop) clients, you’ll need to properly implement the 
libweston-desktop hooks (at least the two mandatory ones), create views 
for surfaces, put them in a layer, and making sure a repaint will 
happen. You can find the very minimal libweston(-desktop) compositor 

For other more specific clients, you’ll need to implement the relevant 
protocols and view creation. Or you can use libweston/Weston plugins[2] 
handling that.

libweston allows to create a solid colour surface, which is used for the 
black-surface-under-fullscreen requirement[3] and by some compositors to 
give a default black background.

I hope this helps.


[1] <https://github.com/sardemff7/not-a-wm/blob/master/main.c>
[2] <https://github.com/wayland-wall/weston-wall>


Quentin “Sardem FF7” Glidic

More information about the wayland-devel mailing list