diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-05 15:20:47 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-10-05 19:35:06 +0000 |
commit | 087b11e881032bbd7bc1cbc06c45480c22ecb714 (patch) | |
tree | ad7a3bf997521877ea957a980429306fc7e738ca /src/plugins/platforms/cocoa/qnsview.mm | |
parent | 12bc984f653a06fcc87d5d5615c976f6e3d1a080 (diff) |
macOS: Rename m_contentView to m_view, to distinguish from [NSWindow contentView]
The contentView is the root view of a NSWindow, but our m_contentView is
just the corresponding NSView of a QWindow, and doesn't always match the
contentView property of the NSWindow.
This is part of a multi part cleanup to the Cocoa platform plugin in
preparation for improved foreign-window support.
Change-Id: Ifaffb12f35544ec05e4a83964b346b47fa4b0576
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 8d3b970158..27f6cb2dbc 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -267,16 +267,16 @@ static bool _q_dontOverrideCtrlLMB = false; - (void)viewDidMoveToSuperview { - if (!(m_platformWindow->m_contentViewIsToBeEmbedded)) + if (!(m_platformWindow->m_viewIsToBeEmbedded)) return; if ([self superview]) { - m_platformWindow->m_contentViewIsEmbedded = true; + m_platformWindow->m_viewIsEmbedded = true; QWindowSystemInterface::handleGeometryChange(m_window, m_platformWindow->geometry()); m_platformWindow->updateExposedGeometry(); QWindowSystemInterface::flushWindowSystemEvents(); } else { - m_platformWindow->m_contentViewIsEmbedded = false; + m_platformWindow->m_viewIsEmbedded = false; } } @@ -338,7 +338,7 @@ static bool _q_dontOverrideCtrlLMB = false; NSRect rect = [self frame]; NSRect windowRect = [[self window] frame]; geometry = QRect(windowRect.origin.x, qt_mac_flipYCoordinate(windowRect.origin.y + rect.size.height), rect.size.width, rect.size.height); - } else if (m_platformWindow->m_contentViewIsToBeEmbedded) { + } else if (m_platformWindow->m_viewIsToBeEmbedded) { // embedded child window, use the frame rect ### merge with case below geometry = QRectF::fromCGRect([self bounds]).toRect(); } else { @@ -368,7 +368,7 @@ static bool _q_dontOverrideCtrlLMB = false; // Don't send the geometry change if the QWindow is designated to be // embedded in a foreign view hiearchy but has not actually been // embedded yet - it's too early. - if (m_platformWindow->m_contentViewIsToBeEmbedded && !m_platformWindow->m_contentViewIsEmbedded) + if (m_platformWindow->m_viewIsToBeEmbedded && !m_platformWindow->m_viewIsEmbedded) return; // Send a geometry change event to Qt, if it's ready to handle events |