summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qguiapplication_qpa.cpp')
-rw-r--r--src/gui/kernel/qguiapplication_qpa.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication_qpa.cpp b/src/gui/kernel/qguiapplication_qpa.cpp
index 4c4f4278b9..3a09c686c0 100644
--- a/src/gui/kernel/qguiapplication_qpa.cpp
+++ b/src/gui/kernel/qguiapplication_qpa.cpp
@@ -61,6 +61,7 @@
#include <QWindowSystemInterface>
#include "private/qwindowsysteminterface_qpa_p.h"
+#include "private/qwindow_qpa_p.h"
#ifndef QT_NO_CLIPBOARD
#include <QtGui/QClipboard>
@@ -658,8 +659,32 @@ void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePr
{
if (e->tlw.isNull())
return;
- QWidget *tlw = e->tlw.data() ? e->tlw.data()->widget() : 0;
- if (!tlw || !tlw->isWindow())
+
+ QWindow *window = e->tlw.data();
+ QWidget *tlw = window ? window->widget() : 0;
+ if (!tlw) {
+ if (window) {
+ QRect newRect = e->newGeometry;
+ QRect cr = window->geometry();
+
+ bool isResize = cr.size() != newRect.size();
+ bool isMove = cr.topLeft() != newRect.topLeft();
+ window->d_func()->geometry = newRect;
+ if (isResize) {
+ QResizeEvent e(newRect.size(), cr.size());
+ QGuiApplication::sendSpontaneousEvent(window, &e);
+ }
+
+ if (isMove) {
+ //### frame geometry
+ QMoveEvent e(newRect.topLeft(), cr.topLeft());
+ QGuiApplication::sendSpontaneousEvent(window, &e);
+ }
+ }
+ return;
+ }
+
+ if (!tlw->isWindow())
return; //geo of native child widgets is controlled by lighthouse
//so we already have sent the events; besides this new rect
//is not mapped to parent