Search code examples
surfacewayland

Distinguish between wl_surface, wl_shell_surface and cairo_surface


Could you please help me to make differences among those surface. What is a top/parent surface ? How to create and destroy each surface in order ?


Solution

  • A wl_surface is a rectangular area that is displayed on the screen. It has a location, size and pixel contents. The backend compositor (weston) does know it.

    A wl_shell is a interface that implemented by a wl_surface, provides a desktop-style user interface.

    a cairo_surface is interface (rectangular area) to draw 2D Objects on wayland surface.

    enter image description here