diff options
author | Axel Spoerl <axel.spoerl@qt.io> | 2023-07-13 15:48:46 +0200 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-07-14 18:40:43 +0200 |
commit | dbb072eb2838a04e89e34dad686394a496d5de87 (patch) | |
tree | af000d6b7a194c9d5219a518b56bd8fa77c547c0 /src/platformsupport/fbconvenience/qfbwindow.cpp | |
parent | 7a1625abf1648c4161c334a8f497a676fdaf17dd (diff) |
QWidget: Don't re-use backing store on Android
QWidget re-uses backing stores created in QWidgetPrivate::create().
The Android platform plugin creates a new platform window, when a
widget becomes a toplevel window. When it is hidden, the platform
window is deleted. The link between QAndroidPlatformWindow and its
backing store is made in the constructor of
QAndroidPlatformBackingstore. When a new QAndroidPlatformWindow is
constructed and the backing store is re-used, there is no more link
between platform window and platform backing store.
This has lead to screen assets not being painted, when shown more than
once.
This patch forces QWidgetPrivate::create() to construct a new backing
store on Android. This way, toplevel windows always have a backing
store associated with it. It adds an assertion to
QAndroidPlatformScreen::addWindow(). That will make e.g.
tst_QWidget::visible() crash without the fix.
Fixes: QTBUG-97482
Pick-to: 6.6 6.5 6.2
Change-Id: Ib1b172068b03549df161ab93ac24a273221d5423
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/platformsupport/fbconvenience/qfbwindow.cpp')
0 files changed, 0 insertions, 0 deletions