summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2018-01-09 13:54:34 +0100
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-01-09 14:54:33 +0000
commitbbd954a374907d62d97bbd42add263923201898e (patch)
tree52868ae522bd9e80b81e4428e9fe4534aa676fa1
parent9d5f48ffc6dc4dacb8414395468008a92ed682c5 (diff)
Fix browser resize
The application was not sending the notification to the browser to resize the canvas. The browser was notifying the application of the resize but the application was not acting on window resize. Task-number: QTBUG-65545 Change-Id: I1ebe3b45c80b8275c74e1e39de3e1a780b953e26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rw-r--r--src/plugins/platforms/webgl/qwebglwindow.cpp6
-rw-r--r--src/plugins/platforms/webgl/qwebglwindow.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/webgl/qwebglwindow.cpp b/src/plugins/platforms/webgl/qwebglwindow.cpp
index 46c6c1b..9bc0b7c 100644
--- a/src/plugins/platforms/webgl/qwebglwindow.cpp
+++ b/src/plugins/platforms/webgl/qwebglwindow.cpp
@@ -149,6 +149,12 @@ QWebGLScreen *QWebGLWindow::screen() const
return static_cast<QWebGLScreen *>(QPlatformWindow::screen());
}
+void QWebGLWindow::setGeometry(const QRect &rect)
+{
+ QWindowSystemInterface::handleGeometryChange(window(), rect);
+ QPlatformWindow::setGeometry(rect);
+}
+
void QWebGLWindow::setDefaults(const QMap<GLenum, QVariant> &values)
{
Q_D(QWebGLWindow);
diff --git a/src/plugins/platforms/webgl/qwebglwindow.h b/src/plugins/platforms/webgl/qwebglwindow.h
index 972207c..4d0a8c2 100644
--- a/src/plugins/platforms/webgl/qwebglwindow.h
+++ b/src/plugins/platforms/webgl/qwebglwindow.h
@@ -63,6 +63,7 @@ public:
QWebGLScreen *screen() const;
+ void setGeometry(const QRect &rect) override;
void setDefaults(const QMap<GLenum, QVariant> &values);
private: