diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-21 16:48:48 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-22 14:33:29 +0000 |
commit | 8b60ebf93a4ca443a0c101ea72cb806a2b105f04 (patch) | |
tree | 5b841d218b3f1fb42ec5c4c575ce2a5aa19007aa /src/plugins/platforms/cocoa/qcocoaintrospection.h | |
parent | a7723f8fa70e1285c7cf7415b1a6518d4111e3ea (diff) |
macOS: Ensure initial geometry is always set
QPlatformWindow initializes its view of the geometry based on the
QWindow geometry during construction. If the initial geometry we
then compute is the same, we would end up exiting early from
QCocoaWindow::setGeometry(), because we compared the new geometry
against the QPlatformWindow::geometry(), and the geometry would
never be reflected in the NSView.
Due to other setGeometry calls this was in most cases masked, but
could in theory happen, and is preventing us from cleaning up other
parts of the code.
The call to QWindow::setGeometry() after setting the initial geometry
is also broken, as the initial geometry is available through the
platform window and QWindow::geometry() already, so setting it again
serves nothing except disabling d->positionAutomatic, which is not
correct.
Change-Id: I0db3cfe7d7c3d14070beee6ae3ea3dfd49da9e05
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintrospection.h')
0 files changed, 0 insertions, 0 deletions