xdg-shell: do not unconditionally apply geometry

Currently xdg-shell applies a geometry set with set_window_geometry unconditionally. But the specification requires:

When applied, the effective window geometry will be the set window geometry clamped to the bounding rectangle of the combined geometry of the surface of the xdg_surface and the associated subsurfaces.


With this patch, the interpretation of "When applied" is on commit. The motivation behind this is to make sure a program author doesn't need to care for a exact order of commands (like first attaching all subsurfaces before setting the geometry).

This is especially important to implement viewporter #132 (closed) / !121 (closed) and transformations, which is why I also added helper functions in meta-wayland-surface.c, which currently don't technically change anything, but will do so then.

Edited by Robert Mader

Merge request reports