Commit ff3465a8 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix AbstractClient::adjustedSize() for wayland windows with no committed buffer

AbstractClient::constrainClientSize() forces the minimum client size of
1x1.

If AbstractClient::adjustedSize() is called before the XdgToplevelClient
is mapped, it will return 1x1 rather than 0x0 as expected, which will
confuse

    QSize s = adjustedSize();
    if (s != size() && s.isValid())
        resizeWithChecks(s);

in AbstractClient::applyWindowRules(). Since 1x1 is different from 0x0,
the xdg-toplevel surface is going to be resized to 1x1.

BUG: 443705
parent d4dd370c
......@@ -3600,7 +3600,12 @@ void AbstractClient::checkOffscreenPosition(QRect* geom, const QRect& screenArea
*/
QSize AbstractClient::adjustedSize() const
{
return clientSizeToFrameSize(constrainClientSize(clientSize()));
QSize size = clientSize();
// The client size is unknown until the window is mapped, don't constrain it.
if (!size.isEmpty()) {
size = constrainClientSize(size);
}
return clientSizeToFrameSize(size);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment