Update QNSView geometry on window resize.
authorMorten Johan Sorvig <morten.sorvig@digia.com>
Thu, 6 Dec 2012 16:46:07 +0000 (17:46 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Dec 2012 08:15:00 +0000 (09:15 +0100)
commite84e86dc8cdab602ed19c18829e57230687a427c
tree2ec5e53cb8bf9ab371f3d750b08000efb3a18b72
parent0c5e2328284e97a293e1153c6ad1bcd2706e044a
Update QNSView geometry on window resize.

Ideally this should not be required since NSWindow
should resize the content view automatically. However,
in the case of modal QDialogs this does not happen.

Add call to updateGeometry in windowDidResize as a
workaround, and remove code which called QNSView::setFrameSize
with the current size.

This will cause duplicate handleGeometryChange calls
in the non-qdialog case, add a test to see if the geometry
really has changed to prevent that.

Change-Id: I29bea23b2ab72f923aeadf8db8cb9131ae177a28
Reviewed-by: Liang Qi <liang.qi@digia.com>
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/cocoa/qnsview.mm