Use QWindow::geometry() for size when sending resize before expose.

Task-number: QTBUG-30996

Change-Id: I9c3589ea67b563f6e588568ee54cc8bbd084f87c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
Friedemann Kleint 2013-06-05 16:11:50 +02:00 committed by The Qt Project
parent c889e28483
commit 476dba9a9f

View File

@ -2251,8 +2251,8 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
if (!p->receivedExpose) {
if (p->resizeEventPending) {
// as a convenience for plugins, send a resize event before the first expose event if they haven't done so
QSize size = p->geometry.size();
QResizeEvent e(size, size);
// window->geometry() should have a valid size as soon as a handle exists.
QResizeEvent e(window->geometry().size(), p->geometry.size());
QGuiApplication::sendSpontaneousEvent(window, &e);
p->resizeEventPending = false;