summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor/tst_compositor.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-09-05 07:49:53 +0200
committerJohan Helsing <johan.helsing@qt.io>2019-09-16 13:39:40 +0000
commit2a3ade8cfc0dbfd27def1bca10b0a119331b4ff9 (patch)
tree6a9ce2ec6d30e7f062d12b1a6b9e12c6a2607022 /tests/auto/compositor/compositor/tst_compositor.cpp
parent70217e58bd4d8e64654df8b58eeac208fc1ebb88 (diff)
Compositor: Expose QPointF version of inputRegionContains
QWaylandSurface::inputRegionContains(const &QPointF) was added in a patch release. Expose it here and start testing it. Task-number: QTBUG-77457 Change-Id: I9e5e487e1d93a2b1873a7e219eed9ef6b0a418b5 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'tests/auto/compositor/compositor/tst_compositor.cpp')
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index f4f63228..7fbe8979 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -909,6 +909,11 @@ void tst_WaylandCompositor::inputRegion()
QVERIFY(!waylandSurface->inputRegionContains(QPoint(1, 6)));
QVERIFY(!waylandSurface->inputRegionContains(QPoint(4, 2)));
+ QVERIFY(!waylandSurface->inputRegionContains(QPointF(0.99, 1.99)));
+ QVERIFY(waylandSurface->inputRegionContains(QPointF(1, 2)));
+ QVERIFY(waylandSurface->inputRegionContains(QPointF(3.99, 4.99)));
+ QVERIFY(!waylandSurface->inputRegionContains(QPointF(4, 5)));
+
// Setting a nullptr input region means we want all events
wl_surface_set_input_region(surface, nullptr);
wl_surface_commit(surface);