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.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 04dd650c77..5c1c01e8c9 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -1102,7 +1102,11 @@ QQuickWindow::QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent)
}
/*!
- \internal
+ Constructs a window for displaying a QML scene, whose rendering will
+ be controlled by the \a control object.
+ Please refer to QQuickRenderControl's documentation for more information.
+
+ \since 5.4
*/
QQuickWindow::QQuickWindow(QQuickRenderControl *control)
: QWindow(*(new QQuickWindowPrivate), nullptr)
@@ -1497,8 +1501,11 @@ bool QQuickWindow::event(QEvent *e)
// or fix QTBUG-90851 so that the event always has points?
bool ret = (da && da->event(e));
- // failsafe: never allow any kind of grab to persist after release
- if (pe->isEndEvent()) {
+ // failsafe: never allow any kind of grab to persist after release,
+ // unless we're waiting for a synth event from QtGui (as with most tablet events)
+ if (pe->isEndEvent() && !(QQuickDeliveryAgentPrivate::isTabletEvent(pe) &&
+ (qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents) ||
+ QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse))) {
if (pe->isSinglePointEvent()) {
if (static_cast<QSinglePointEvent *>(pe)->buttons() == Qt::NoButton) {
auto &firstPt = pe->point(0);
@@ -1732,6 +1739,12 @@ QPair<QQuickItem*, QQuickPointerHandler*> QQuickWindowPrivate::findCursorItemAnd
}
#endif
+void QQuickWindowPrivate::clearFocusObject()
+{
+ if (auto da = deliveryAgentPrivate())
+ da->clearFocusObject();
+}
+
/*!
\qmlproperty list<QtObject> Window::data
\qmldefault