From: Andy Shaw Date: Wed, 7 Nov 2012 13:46:26 +0000 (+0100) Subject: Prevent frame notifications going out when the content view is set X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38545380e4dfa8d161b9db614d63f16394923f66;p=profile%2Fivi%2Fqtbase.git Prevent frame notifications going out when the content view is set 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 --- 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)