requested to merge jadahl/mutter:wip/move-meta-window-away-from-meta-wayland-surface into master
Quoting the last commit message
wayland: Move MetaWindow ownership to window owning roles There are two surface roles owning a MetaWindow: MetaWaylandShellSurface (basis of MetaWaylandXdgToplevel, MetaWaylandXdgPopup, MetaWaylandWlShellSurface, etc), and MetaXwaylandSurface. With these two role types, the MetaWindow has two different types of life times. With MetaWaylandShellSurface, the window is owned and managed by the role itself, while with MetaXwaylandSurface, the MetaWindow is tied to the X11 window, while the Wayland surface and its role plays more the role of the backing rendering surface. Before, for historical reasons, MetaWindow was part of MetaWaylandSurface, even though just some roles used it, and before 'wayland: Untie MetaWindowXwayland lifetime from the wl_surface' had equivalent life times as well. But since that commit, the management changed. To not have the same fied in MetaWaylandSurface being managed in such drastically different ways, rearrange it so that the roles that has a MetaWindow themself manages it in the way it is meant to; meaning MetaWaylandShellSurface practically owns it, while with Xwayland, the existance of a MetaWindow is tracked via X11.