summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-12 03:05:02 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-12 03:05:02 +0100
commitb8f609f5d17051ed7396eb9f6c874a9cbb73b6b5 (patch)
treeadf3be89674752abe23a59752f5aab533c55eb78
parentd66b0218233f2a97eb864aa1bd8bae325b6535e1 (diff)
parent2493c8b6600f2617848007ee9592c71361b432fe (diff)
downloadqtwayland-b8f609f5d17051ed7396eb9f6c874a9cbb73b6b5.tar.gz
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I24b2eade3e8946a654ef6cf3d02ea95255aa1c00
-rw-r--r--src/client/qwaylandinputdevice.cpp5
-rw-r--r--tests/auto/client/shared/mockcompositor.cpp11
-rw-r--r--tests/auto/client/shared/xdgshell.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index a9da452d..a4098edd 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -1381,7 +1381,10 @@ void QWaylandInputDevice::handleTouchPoint(int id, Qt::TouchPointState state, co
tp.area.moveCenter(globalPosition);
}
- tp.state = state;
+ // If the touch point was pressed earlier this frame, we don't want to overwrite its state.
+ if (tp.state != Qt::TouchPointPressed)
+ tp.state = state;
+
tp.pressure = tp.state == Qt::TouchPointReleased ? 0 : 1;
}
diff --git a/tests/auto/client/shared/mockcompositor.cpp b/tests/auto/client/shared/mockcompositor.cpp
index 5f2d8907..e44cea63 100644
--- a/tests/auto/client/shared/mockcompositor.cpp
+++ b/tests/auto/client/shared/mockcompositor.cpp
@@ -58,13 +58,10 @@ DefaultCompositor::DefaultCompositor()
});
});
- QObject::connect(get<XdgWmBase>(), &XdgWmBase::toplevelCreated, [&] (XdgToplevel *toplevel) {
- // Needed because lambdas don't support Qt::DirectConnection
- exec([&]{
- if (m_config.autoConfigure)
- toplevel->sendCompleteConfigure();
- });
- });
+ QObject::connect(get<XdgWmBase>(), &XdgWmBase::toplevelCreated, get<XdgWmBase>(), [&] (XdgToplevel *toplevel) {
+ if (m_config.autoConfigure)
+ toplevel->sendCompleteConfigure();
+ }, Qt::DirectConnection);
}
Q_ASSERT(isClean());
}
diff --git a/tests/auto/client/shared/xdgshell.cpp b/tests/auto/client/shared/xdgshell.cpp
index 13acc01e..72582f48 100644
--- a/tests/auto/client/shared/xdgshell.cpp
+++ b/tests/auto/client/shared/xdgshell.cpp
@@ -83,7 +83,7 @@ XdgSurface::XdgSurface(XdgWmBase *xdgWmBase, Surface *surface, wl_client *client
{
QVERIFY(!surface->m_pending.buffer);
QVERIFY(!surface->m_committed.buffer);
- connect(this, &XdgSurface::toplevelCreated, xdgWmBase, &XdgWmBase::toplevelCreated);
+ connect(this, &XdgSurface::toplevelCreated, xdgWmBase, &XdgWmBase::toplevelCreated, Qt::DirectConnection);
connect(surface, &Surface::attach, this, &XdgSurface::verifyConfigured);
connect(surface, &Surface::commit, this, [this] {
m_committed = m_pending;