summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnsview.mm
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-04-24 10:59:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-26 12:08:24 +0200
commit9f1b64766b64fac2df8dd112d2801c15a781bdf9 (patch)
treeddfabc5f1c270773cd9bbf3b8cd089690544fc44 /src/plugins/platforms/cocoa/qnsview.mm
parent2e69015d74a903d7319dec164214b9f443980a08 (diff)
Don't use the SubWindow flag for windows embedded in foreign windows
Instead, add QCocoaWindow::setEmbeddedInForeignView which can be called via QPlatformNativeInterface::NativeResourceForIntegrationFunction Task-number: QTBUG-30805 Change-Id: I05861e80ca664ddb430216388cf0fec573a4d32b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index d1dd939600..a53d6c4e44 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -172,7 +172,7 @@ static QTouchDevice *touchDevice = 0;
- (void)viewDidMoveToSuperview
{
- if (!(m_window->type() & Qt::SubWindow))
+ if (!(m_platformWindow->m_contentViewIsToBeEmbedded))
return;
if ([self superview]) {
@@ -208,7 +208,7 @@ static QTouchDevice *touchDevice = 0;
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_window->type() & Qt::SubWindow) {
+ } else if (m_platformWindow->m_contentViewIsToBeEmbedded) {
// embedded child window, use the frame rect ### merge with case below
geometry = qt_mac_toQRect([self bounds]);
} else {
@@ -229,9 +229,9 @@ static QTouchDevice *touchDevice = 0;
m_platformWindow->QPlatformWindow::setGeometry(geometry);
// Don't send the geometry change if the QWindow is designated to be
- // embedded in a foregin view hiearchy but has not actually been
+ // embedded in a foreign view hiearchy but has not actually been
// embedded yet - it's too early.
- if ((m_window->type() & Qt::SubWindow) && !m_platformWindow->m_contentViewIsEmbedded)
+ if (m_platformWindow->m_contentViewIsToBeEmbedded && !m_platformWindow->m_contentViewIsEmbedded)
return;
// Send a geometry change event to Qt, if it's ready to handle events