From 10deffef805a826f20efad661a13d141f2c6b95b Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 16 Sep 2013 13:33:28 +0200 Subject: [PATCH 1/2] tmp Change-Id: I14da2987bd5040a7762feac439ce20dcedc765ef --- src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm | 1 + src/plugins/platforms/cocoa/qnsview.mm | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm index 423d552..41fbb5a 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm @@ -114,6 +114,7 @@ static void cleanupCocoaApplicationDelegate() - (void)updateScreens:(NSNotification *)notification { Q_UNUSED(notification); + qDebug() << "updateScreens in qcocoaapplicationdelegate.mm"; if (QCocoaIntegration *ci = dynamic_cast(QGuiApplicationPrivate::platformIntegration())) ci->updateScreens(); } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ea8e1b3..b81e065 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -295,6 +295,7 @@ static QTouchDevice *touchDevice = 0; if (m_window) { QCocoaIntegration *ci = static_cast(QGuiApplicationPrivate::platformIntegration()); NSUInteger screenIndex = [[NSScreen screens] indexOfObject:self.window.screen]; + qDebug() << "NSWindowDidChangeScreenNotification in qnsview.mm. screenIndex:" << screenIndex << ", NSNotFound=" << NSNotFound; if (screenIndex != NSNotFound) { QCocoaScreen *cocoaScreen = ci->screenAtIndex(screenIndex); QWindowSystemInterface::handleWindowScreenChanged(m_window, cocoaScreen->screen()); -- 1.8.2.2