Make popup menus non-resizable on WASM

Windows that are of popup type only should not be resizable. Those that
are dialogs as well, should, provided their minimum size does not match
their non-empty maximum size.

Fixes: QTBUG-106560
Change-Id: I76851e19949110323f949a1d17260fbd4fc35159
Reviewed-by: David Skoland <david.skoland@qt.io>
(cherry picked from commit 9ec7cbc77462938969e9569deeb5a106d321ce21)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Mikolaj Boc 2022-09-12 15:36:46 +02:00 committed by Qt Cherry-pick Bot
parent c2be8b3516
commit f213f58889

View File

@ -243,6 +243,10 @@ bool QWasmWindow::isPointOnTitle(QPoint point) const
bool QWasmWindow::isPointOnResizeRegion(QPoint point) const
{
// Certain windows, like undocked dock widgets, are both popups and dialogs. Those should be
// resizable.
if (windowIsPopupType(window()->flags()))
return false;
return (window()->maximumSize().isEmpty() || window()->minimumSize() != window()->maximumSize())
&& resizeRegion().contains(point);
}