QQuickWidget: Keep the offscreen quick window size in sync
authorLaszlo Agocs <laszlo.agocs@digia.com>
Thu, 28 Aug 2014 10:23:46 +0000 (12:23 +0200)
committerLaszlo Agocs <laszlo.agocs@digia.com>
Fri, 29 Aug 2014 21:19:18 +0000 (23:19 +0200)
commitc2db9b6a48ac979057be640013655c815a153e21
treedb73f7fd64bccb788de0e75d87c57d0332f5dd39
parenta23ee5c0de0d91859e1e76e64073861347dd9861
QQuickWidget: Keep the offscreen quick window size in sync

The resizing logic has some faults: The size change is not always communicated
to the offscreen QQuickWindow. When hiding and showing a QQuickWidget we may
return early from the resize event handler, skipping the geometry change for
the offscreen window. This is wrong.

To make sure the sizes always match, set the geometry together with the
FBO creation instead. This is much more robust and guarantees that the
FBO size and the QQuickWindow size will not be out of sync.

Task-number: QTBUG-40517
Change-Id: I61ef3ad2d23dff4280dbf03b57c03c1aeda8dc91
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
src/quickwidgets/qquickwidget.cpp