wasm: Respect maximum window size in QWasmWindow

Currently we are only checking if windowMinimumSize is not violated,
and we dont check windowMaximumSize at all, which may results in
windows being bigger than they ought to be.
When the sizeHints are updated, call the setGeometry() function which
makes sure that size constraints are respected and will resize window
if needed.

Pick-to: 6.5 6.6
Change-Id: I703bddec85ba6e02eea74a39e06d1f70d59e1677
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Piotr Wierciński 2023-11-09 13:29:21 +01:00
parent 028dcbdb37
commit 969bef9454

View File

@ -377,12 +377,8 @@ WId QWasmWindow::winId() const
void QWasmWindow::propagateSizeHints()
{
QRect rect = windowGeometry();
if (rect.size().width() < windowMinimumSize().width()
&& rect.size().height() < windowMinimumSize().height()) {
rect.setSize(windowMinimumSize());
setGeometry(rect);
}
// setGeometry() will take care of minimum and maximum size constraints
setGeometry(windowGeometry());
m_nonClientArea->propagateSizeHints();
}