Preliminary change to get resizeEvents for QWindow::resize() calls

Change-Id: I43e1d7fb98f1b20939dba8cdccffa4dcb99a7369
Reviewed-on: http://codereview.qt.nokia.com/3453
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
Gunnar Sletta 2011-08-24 09:05:27 +02:00 committed by Morten Johan Sørvig
parent 1b2dae36d3
commit b6ef26adce
2 changed files with 6 additions and 2 deletions

View File

@ -411,9 +411,10 @@ void QWindow::setSizeIncrement(const QSize &size)
void QWindow::setGeometry(const QRect &rect)
{
Q_D(QWindow);
d->geometry = rect;
if (d->platformWindow) {
d->platformWindow->setGeometry(rect);
} else {
d->geometry = rect;
}
}

View File

@ -100,6 +100,8 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw)
m_windowSurfaceView = m_contentView;
}
setGeometry(tlw->geometry());
[m_nsWindow setContentView:m_contentView];
}
@ -112,8 +114,9 @@ void QCocoaWindow::setGeometry(const QRect &rect)
{
QPlatformWindow::setGeometry(rect);
NSRect bounds = globalGeometry(window()->geometry());
NSRect bounds = globalGeometry(rect);
[[m_nsWindow contentView]setFrameSize:bounds.size];
[m_nsWindow setContentSize : bounds.size];
[m_nsWindow setFrameOrigin : bounds.origin];
if (m_glContext)