diff options
author | Mikko Levonmaa <mikko.levonmaa@lge.com> | 2014-03-31 11:31:18 -0700 |
---|---|---|
committer | Mikko Levonmaa <mikko.levonmaa@lge.com> | 2014-10-20 09:58:56 +0200 |
commit | 155aee0c513e88f83364ee932b344cfbee1f4986 (patch) | |
tree | 40da8e773c2f62d6dbbb676570392912677c6940 /tests/auto/compositor/mockclient.cpp | |
parent | 0febf7c52f5cc4bc5c7767f7572ff87a5aa8a7af (diff) |
Support for multiple input devices
Allows the registration of multiple input devices for the compositor via
private APIs. Since the Qt stack does not support separate input devices
via the QPA, the identification of each device (wl_seat) is left up to
the implementor.
The compositor will identify input event via the QWaylandInputDevice::isOwner
method. Usually this will happen when an item on the UI has received an
event and would like to send it to the client surface. See
QWaylandSurfaceItem for more details.
Includes basic unit tests
Change-Id: I7ee1db49388713bf3076c23cf8f8a165aefc2fe0
Reviewed-by: Mikko Levonmaa <mikko.levonmaa@lge.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'tests/auto/compositor/mockclient.cpp')
-rw-r--r-- | tests/auto/compositor/mockclient.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/compositor/mockclient.cpp b/tests/auto/compositor/mockclient.cpp index 9bbe56519..8f2bbbc6d 100644 --- a/tests/auto/compositor/mockclient.cpp +++ b/tests/auto/compositor/mockclient.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "mockclient.h" +#include "mockseat.h" #include <QElapsedTimer> #include <QSocketNotifier> @@ -145,6 +146,9 @@ void MockClient::handleGlobal(uint32_t id, const QByteArray &interface) shm = static_cast<wl_shm *>(wl_registry_bind(registry, id, &wl_shm_interface, 1)); } else if (interface == "wl_shell") { wlshell = static_cast<wl_shell *>(wl_registry_bind(registry, id, &wl_shell_interface, 1)); + } else if (interface == "wl_seat") { + wl_seat *s = static_cast<wl_seat *>(wl_registry_bind(registry, id, &wl_seat_interface, 1)); + m_seats << new MockSeat(s); } } |