Resizing to an empty size needs to be handled as if the widget was
hidden. Restoring to a non-empty size is like a show, except that we
are rendering synchronously.
Task-number: QTBUG-37046
Change-Id: I572e4763c4a28bfe7347868e109acca5b357db50
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
, updateTimer(0)
, eventPending(false)
, updatePending(false)
+ , fakeHidden(false)
{
renderControl = new QQuickRenderControl;
offscreenWindow = new QQuickWindow(renderControl);
if (d->resizeMode == SizeRootObjectToView)
d->updateSize();
+ if (e->size().isEmpty()) {
+ //stop rendering
+ QQuickWindowPrivate::get(d->offscreenWindow)->forceRendering = false;
+ d->fakeHidden = true;
+ return;
+ }
+ if (d->fakeHidden) {
+ //restart rendering
+ QQuickWindowPrivate::get(d->offscreenWindow)->forceRendering = true;
+ d->fakeHidden = false;
+ d->renderControl->sync();
+ }
+
d->createContext();
createFramebufferObject();
d->offscreenWindow->resizeEvent(e);
int updateTimer;
bool eventPending;
bool updatePending;
+ bool fakeHidden;
};
QT_END_NAMESPACE