XDG-Shell: Compositor does not respect window geometry
From the spec:
The window geometry of a surface is its "visible bounds" from the user's perspective. ... 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.
My interpretation from this is that the window geometry is smaller or equal to the surface geometry. Since !141 (merged) we do clamp the window geometry to the surface size, but we do not crop the surface if the window geometry is smaller. So if we don't crop, there's not really a point of having xdg_surface_set_window_geometry
.
The result are cases like this (tested with weston-scaler with https://gitlab.freedesktop.org/wayland/weston/merge_requests/52 ontop):
While the desired outcome should probably rather like this:
So please correct me if I'm wrong, but I think we should make the compositor crop surfaces accordingly. Of course this is a bug in the client, but the compositor should probably enforce correct behaviour. The odd thing here is that weston doesn't do that either, so I'm not completely sure. If we do it, it might uncover bugs in clients and toolkits.