[writing a compositor] Displaying something on the screen

adlo adloconwy at gmail.com
Tue Jun 5 05:08:54 UTC 2018


Thanks, this was very useful.

My compositor now works, but windows don't initially render until I click on my compositor, though they render properly after that.

How can I resolve this?

Regards

adlo

> On 31 May 2018, at 10:05, Quentin Glidic <sardemff7+wayland at sardemff7.net> wrote:
> 
> Hi,
> 
>> 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 here[1].
> 
> 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.
> 
> Cheers,
> 
> 
> [1] <https://github.com/sardemff7/not-a-wm/blob/master/main.c>
> [2] <https://github.com/wayland-wall/weston-wall>
> [3] <https://cgit.freedesktop.org/wayland/weston/tree/desktop-shell/shell.c?id=bfaaedc9145acfe626c0173495d49f63392f3956#n2138>
> 
> -- 
> 
> Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list