区分 wl_surface、wl_shell_surface 和 cairo_surface

Distinguish between wl_surface, wl_shell_surface and cairo_surface

你能帮我区分一下这些表面吗? 什么是 top/parent 表面? 如何按顺序创建和销毁每个表面?

一个wl_surface是一个显示在屏幕上的矩形区域。它具有位置、大小和像素内容。后端合成器 (weston) 确实知道它。

wl_shell 是由 wl_surface 实现的界面,提供桌面风格的用户界面。

a cairo_surface 是在 wayland 表面上绘制 2D 对象的界面(矩形区域)。