From 99414a3b4ee01a7e3427a40449603b5c3c4138cc Mon Sep 17 00:00:00 2001 From: Matthew Cattell Date: Wed, 7 Sep 2011 12:44:32 +0200 Subject: [PATCH] send resize event when window resized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4415f1dbdf9bcc96dda10d00c8982a9d4ee433c4 Reviewed-on: http://codereview.qt.nokia.com/4344 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index f0458611917..6cddf3ab737 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -46,6 +46,7 @@ #include "private/qevent_p.h" #include "qfont.h" #include "qplatformfontdatabase_qpa.h" +#include "qplatformwindow_qpa.h" #include #include @@ -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)