If a QWindow without a platform window is resized, emit changed signal

Needed as a consequence of I4f5e37480eef5d105e45ffd60362a57f13ec55f5
Otherwise a Window in QML doesn't get notified to update its layout
after being mapped the first time, on Linux.

Change-Id: I8b1291e16b11eb93ab045ac5c5ed6b478391cb21
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
bb10
Shawn Rutledge 2013-03-06 14:16:56 +01:00 committed by The Qt Project
parent 846cf1a13f
commit 463dac4e00
1 changed files with 5 additions and 0 deletions

View File

@ -1259,7 +1259,12 @@ void QWindow::resize(const QSize &newSize)
if (d->platformWindow) {
d->platformWindow->setGeometry(QRect(position(), newSize));
} else {
const QSize oldSize = d->geometry.size();
d->geometry.setSize(newSize);
if (newSize.width() != oldSize.width())
emit widthChanged(newSize.width());
if (newSize.height() != oldSize.height())
emit heightChanged(newSize.height());
}
}