diff options
author | Johan Klokkahmmer Helsing <johan.helsing@qt.io> | 2016-09-29 14:59:56 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2016-10-03 13:49:53 +0000 |
commit | 7e5af3d2903e25404422b705837408ccd89c74b9 (patch) | |
tree | e453dac6b2265778f836026d202778e08195806e /src/compositor/compositor_api/qwaylandtouch_p.h | |
parent | db9f2fc90ad1ae302846fa23d4955a8c07c444b7 (diff) |
Compositor: Send touch events to the surface pressed
This changes the API so that QWaylandTouch does not make assumptions
about touch focus, and consequently enables writing compositors where
multiple clients can receive touch input at the same time.
Task-number: QTBUG-56237
Change-Id: I21fe6d9b5ac65e9f910f64cc4a02824119571c52
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/compositor_api/qwaylandtouch_p.h')
-rw-r--r-- | src/compositor/compositor_api/qwaylandtouch_p.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/compositor/compositor_api/qwaylandtouch_p.h b/src/compositor/compositor_api/qwaylandtouch_p.h index 35cd30502..75529134b 100644 --- a/src/compositor/compositor_api/qwaylandtouch_p.h +++ b/src/compositor/compositor_api/qwaylandtouch_p.h @@ -71,31 +71,14 @@ public: QWaylandCompositor *compositor() const { return seat->compositor(); } - uint sendDown(uint32_t time, int touch_id, const QPointF &position); - void sendMotion(uint32_t time, int touch_id, const QPointF &position); - uint sendUp(uint32_t time, int touch_id); + uint sendDown(QWaylandSurface *surface, uint32_t time, int touch_id, const QPointF &position); + void sendMotion(QWaylandClient *client, uint32_t time, int touch_id, const QPointF &position); + uint sendUp(QWaylandClient *client, uint32_t time, int touch_id); - void setFocusResource() - { - if (focusResource) - return; - - QWaylandView *mouseFocus = seat->mouseFocus(); - if (!mouseFocus || !mouseFocus->surface()) - return; - - focusResource = resourceMap().value(mouseFocus->surface()->waylandClient()); - } private: - void resetFocusState(); - void touch_bind_resource(Resource *resource) Q_DECL_OVERRIDE; - void touch_destroy_resource(Resource *resource) Q_DECL_OVERRIDE; void touch_release(Resource *resource) Q_DECL_OVERRIDE; QWaylandSeat *seat; - - Resource *focusResource; - QWaylandDestroyListener focusDestroyListener; }; QT_END_NAMESPACE |