Android: directly set available geometry from handleLayoutSizeChanged()

Don't check for current primary screen available geometry as that value
might not have been set (invokeMethod() is used for that) from a
previous call. Also, in any case, handleLayoutSizeChanged() is only ever
called when the root layout size has really changed.

Amends 0f2c6450201bfa1e612175cddf7481ab72eb4620.

Fixes: QTBUG-133456
Change-Id: I3219529d0f18d4cfc8a9d0eca7573de57ae9e43d
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
This commit is contained in:
Assam Boudjelthia 2025-02-12 17:09:20 +02:00
parent 20d058acfc
commit 16ef3aaa74

View File

@ -556,12 +556,6 @@ static void terminateQt(JNIEnv *env, jclass /*clazz*/)
static void handleLayoutSizeChanged(JNIEnv * /*env*/, jclass /*clazz*/,
jint availableWidth, jint availableHeight)
{
if (m_androidPlatformIntegration) {
QSize currentSize = m_androidPlatformIntegration->screen()->availableGeometry().size();
if (currentSize.width() == availableWidth && currentSize.height() == availableHeight)
return;
}
QMutexLocker lock(&m_platformMutex);
// available geometry always starts from top left
const QRect availableGeometry(0, 0, availableWidth, availableHeight);