send resize event when window resized

Change-Id: I4415f1dbdf9bcc96dda10d00c8982a9d4ee433c4
Reviewed-on: http://codereview.qt.nokia.com/4344
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Matthew Cattell 2011-09-07 12:44:32 +02:00 committed by Samuel Rødal
parent 37fe917272
commit 99414a3b4e

View File

@ -46,6 +46,7 @@
#include "private/qevent_p.h"
#include "qfont.h"
#include "qplatformfontdatabase_qpa.h"
#include "qplatformwindow_qpa.h"
#include <QtCore/QAbstractEventDispatcher>
#include <QtCore/private/qcoreapplication_p.h>
@ -919,8 +920,13 @@ void QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::E
if (!e->exposed)
return;
QExposeEvent event(e->region);
QCoreApplication::sendSpontaneousEvent(e->exposed.data(), &event);
QWindow *window = e->exposed.data();
QResizeEvent resizeEvent(window->handle()->geometry().size(), window->size());
QGuiApplication::sendSpontaneousEvent(window, &resizeEvent);
QExposeEvent exposeEvent(e->region);
QCoreApplication::sendSpontaneousEvent(window, &exposeEvent);
}
Qt::DropAction QGuiApplicationPrivate::processDrag(QWindow *w, QMimeData *dropData, const QPoint &p)