Instead of telling it in the construction after forcing the window
creation, install an event handler that sets it when we get the
PlatformSurface event.
It has the advantage that it will also trigger in subsequent platform
surface events (e.g. after hide and show).
Making it possible for clients to call setDesiredSize directly,
The idea is that under Wayland, the panel calls this intead of setGeometry,
not trying to set an abosulute geometry that might cause the panel sized wrongly,
but just sets an hint which will ensure the panel won't overlap another one
used by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5437
CCBUG:489703
Otherwise we get the following error message:
Property "margins" with type "QMargins", which is not a value type
Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This code was designed to make sure we didn't commit new buffers whilst
we were waiting for a configure. The way this worked failed in 6 after
kwin does not reply to desired_size changes immediately.
It is uneeded after kwin commit "wayland: Avoid rearranging layer
surfaces when wl_surface size changes" which means if we do submit
frames between size change requests, they'll be ignored. Meaning the
client will eventually get a configure event at the right size.
Depending on code path taken, geometry.size() == m_pendingSize can
produce incorrect results.
If a configure event is applied, it's fine.
If the window is resized by user, m_pendingSize will have outdated value,
and setWindowGeometry() can ignore future size updates that are valid.
In hindsight, we need special hooks in the QWaylandWindow to request and
apply new geometry. Rather than have one function that deals with all cases.