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.
When a resize is driven client side we wait for the compositor to have a
chance to reconfigure us before submitting the next frame.
Using a blocking round trip caused an issue. Instead block isExposed and
trigger an expose event whilst a sync is in progress.
Qt's resizing is inherently synchronous. When an application calls
QWindow::setGeometry with a new size, we expect it to make that resize.
An expose event of the requested size will be generated.
Wayland is by default async, a client requests a size, and then will be
configured to that size, or potentially another size.
The simplest way to map the two APIs is to roundtrip when the client
wants to resize. This way we can guarantee that a call to
`setGeometry(); update()` will have the server configured size before
the paint.
In practice it's still not perfect due to other issues, but at least
will sort itself out within a frame.
This can be used to disambiguate the exclusive edge when the anchors are
on a corner (so there would be 2 candidates)
it's quite quick and dirty mostly to understand if we do want to push
for something along the lines
This reverts commit be63783888.
It broke keyboard input in sddm greeter. While defaulting to a non-spec
value is not great, it's also not that critical. It might be worth
considering synchronizing Qt::WindowDoesNotAcceptFocus with the keyboard
interactivity flag, but the tricky part is that the keyboard interactivty
is not just a boolean.
BUG: 477251