diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-07-04 13:28:47 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-08-08 01:48:35 +0200 |
| commit | e2ce1f724f56db8072033665d066ad34f4d4c702 (patch) | |
| tree | 1f25baf938e51bd030bddc256e275a1365971ddc /src/plugins/platforms/android/qandroidplatformopenglwindow.cpp | |
| parent | eea00824bdbc6740261d2b78821e31c1f21c9c0c (diff) | |
Android: Create QtWindow before applying QWindow geometry during init
During QAndroidPlatformWindow::initialize() we call setGeometry, which
may end up in QAndroidPlatformWindow::setNativeGeometry() via one of
the QAndroidPlatformWindow subclasses, i.e. GL, Vulkan, or foreign
window.
We currently bail out from setNativeGeometry if !m_surfaceCreated,
but this is only a workaround for the m_nativeQtWindow not being
alive yet.
As long as we have a m_nativeQtWindow, we should be able to set the
layout parameters of that QtWindow, independently of whether it has
a QtSurface or is hosting a foreign Android view.
As a start, move the QtWindow initialization earlier in initialize().
The isEmbeddingContainer() check can go at the top, as we shouldn't
do any modifications to a window that's purely used to act as a
container when embedding Qt in native Android apps.
Pick-to: 6.8
Change-Id: Ia3f0b33e6729f5399946d86799f39877d058511b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglwindow.cpp')
0 files changed, 0 insertions, 0 deletions
