From 38545380e4dfa8d161b9db614d63f16394923f66 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 7 Nov 2012 14:46:26 +0100 Subject: [PATCH] Prevent frame notifications going out when the content view is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When the content view is set it will trigger a frame notification which we do not want to see because it would put our internal data on the geometry out of sync. So ignore the notification until after it is set. Change-Id: I704c2f186c8b0c6508a90d5dab51b7f6f02162fc Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index c1c5f49..a762603 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -717,7 +717,9 @@ void QCocoaWindow::setNSWindow(NSWindow *window) name:nil // Get all notifications object:m_nsWindow]; + [m_contentView setPostsFrameChangedNotifications: NO]; [window setContentView:m_contentView]; + [m_contentView setPostsFrameChangedNotifications: YES]; } void QCocoaWindow::clearNSWindow(NSWindow *window) -- 2.7.4