aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 155a52bd9b..07d87989b5 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -453,13 +453,15 @@ void QQuickWindowPrivate::renderSceneGraph(const QSize &size)
fboId = renderTargetId;
renderer->setDeviceRect(rect);
renderer->setViewportRect(rect);
+ renderer->setProjectionMatrixToRect(QRect(QPoint(0, 0), rect.size()));
+ renderer->setDevicePixelRatio(1);
} else {
QRect rect(QPoint(0, 0), devicePixelRatio * size);
renderer->setDeviceRect(rect);
renderer->setViewportRect(rect);
+ renderer->setProjectionMatrixToRect(QRect(QPoint(0, 0), size));
+ renderer->setDevicePixelRatio(devicePixelRatio);
}
- renderer->setProjectionMatrixToRect(QRect(QPoint(0, 0), size));
- renderer->setDevicePixelRatio(devicePixelRatio);
context->renderNextFrame(renderer, fboId);
}
@@ -1895,8 +1897,6 @@ void QQuickWindowPrivate::deliverDelayedTouchEvent()
deliverPointerEvent(pointerEventInstance(e.data()));
}
-static bool qquickwindow_no_touch_compression = qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
-
bool QQuickWindowPrivate::compressTouchEvent(QTouchEvent *event)
{
Q_Q(QQuickWindow);
@@ -1973,6 +1973,8 @@ void QQuickWindowPrivate::handleTouchEvent(QTouchEvent *event)
qCDebug(DBG_TOUCH) << event;
+ static bool qquickwindow_no_touch_compression = qEnvironmentVariableIsSet("QML_NO_TOUCH_COMPRESSION");
+
if (qquickwindow_no_touch_compression || pointerEventRecursionGuard) {
deliverPointerEvent(pointerEventInstance(event));
return;
@@ -2100,7 +2102,7 @@ void QQuickWindowPrivate::flushFrameSynchronousEvents()
There is a unique instance per QQuickPointerDevice, which is determined
from \a event's device.
*/
-QQuickPointerEvent *QQuickWindowPrivate::pointerEventInstance(QEvent *event)
+QQuickPointerEvent *QQuickWindowPrivate::pointerEventInstance(QEvent *event) const
{
QQuickPointerDevice *dev = nullptr;
switch (event->type()) {
@@ -4164,6 +4166,28 @@ void QQuickWindow::resetOpenGLState()
*/
/*!
+ \qmlproperty variant Window::targetScreen
+
+ Specifies the screen the window should be placed on. Equivalent to
+ QWindow::setScreen().
+
+ The value must be an element from the Qt.application.screens array.
+
+ By default the value is null which leads to using the primary screen.
+
+ \note To ensure that the window is associated with the desired screen right
+ upon the underlying native window's initial creation, make sure this
+ property is set as early as possible and that the setting of its value is
+ not deferred. This can be particularly important on embedded platforms
+ without a windowing system, where only one window per screen is allowed at a
+ time.
+
+ \since 5.9
+
+ \sa QWindow::setScreen(), QScreen, Qt.application
+ */
+
+/*!
\qmlproperty Item Window::activeFocusItem
\since 5.1