2020-12-09 12:36:18 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
2020-02-12 15:20:38 +00:00
|
|
|
|
2020-12-09 12:36:18 +00:00
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2020-02-12 15:20:38 +00:00
|
|
|
// Qt
|
|
|
|
#include <QHash>
|
2023-07-03 19:28:19 +00:00
|
|
|
#include <QSignalSpy>
|
|
|
|
#include <QTest>
|
2020-02-12 15:20:38 +00:00
|
|
|
#include <QThread>
|
|
|
|
// WaylandServer
|
2023-09-13 05:52:59 +00:00
|
|
|
#include "wayland/compositor.h"
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "wayland/display.h"
|
2023-09-13 05:52:59 +00:00
|
|
|
#include "wayland/seat.h"
|
|
|
|
#include "wayland/tablet_v2.h"
|
2020-02-12 15:20:38 +00:00
|
|
|
|
2020-04-29 13:59:23 +00:00
|
|
|
#include "KWayland/Client/compositor.h"
|
|
|
|
#include "KWayland/Client/connection_thread.h"
|
|
|
|
#include "KWayland/Client/event_queue.h"
|
|
|
|
#include "KWayland/Client/registry.h"
|
|
|
|
#include "KWayland/Client/seat.h"
|
2020-12-16 01:46:33 +00:00
|
|
|
#include "KWayland/Client/surface.h"
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
#include "qwayland-tablet-unstable-v2.h"
|
|
|
|
|
2023-09-13 17:59:29 +00:00
|
|
|
using namespace KWin;
|
2022-12-21 00:55:20 +00:00
|
|
|
using namespace std::literals;
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
class Tablet : public QtWayland::zwp_tablet_v2
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Tablet(::zwp_tablet_v2 *t)
|
|
|
|
: QtWayland::zwp_tablet_v2(t)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-12-16 01:46:33 +00:00
|
|
|
class TabletPad : public QObject, public QtWayland::zwp_tablet_pad_v2
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabletPad(::zwp_tablet_pad_v2 *t)
|
|
|
|
: QtWayland::zwp_tablet_pad_v2(t)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
void zwp_tablet_pad_v2_done() override
|
|
|
|
{
|
2020-12-16 01:46:33 +00:00
|
|
|
Q_ASSERT(!doneCalled);
|
|
|
|
doneCalled = true;
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
void zwp_tablet_pad_v2_buttons(uint32_t buttons) override
|
|
|
|
{
|
2020-12-16 01:46:33 +00:00
|
|
|
Q_ASSERT(buttons == 1);
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
void zwp_tablet_pad_v2_enter(uint32_t /*serial*/, struct ::zwp_tablet_v2 * /*tablet*/, struct ::wl_surface *surface) override
|
|
|
|
{
|
2020-12-16 01:46:33 +00:00
|
|
|
m_currentSurface = surface;
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
void zwp_tablet_pad_v2_button(uint32_t /*time*/, uint32_t button, uint32_t state) override
|
|
|
|
{
|
2020-12-16 01:46:33 +00:00
|
|
|
buttonStates[m_currentSurface][button] = state;
|
|
|
|
Q_EMIT buttonReceived();
|
|
|
|
}
|
|
|
|
|
|
|
|
::wl_surface *m_currentSurface = nullptr;
|
|
|
|
|
|
|
|
bool doneCalled = false;
|
|
|
|
QHash<::wl_surface *, QHash<uint32_t, uint32_t>> buttonStates;
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void buttonReceived();
|
|
|
|
};
|
|
|
|
|
2020-02-12 15:20:38 +00:00
|
|
|
class Tool : public QObject, public QtWayland::zwp_tablet_tool_v2
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
Tool(::zwp_tablet_tool_v2 *t)
|
|
|
|
: QtWayland::zwp_tablet_tool_v2(t)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void zwp_tablet_tool_v2_proximity_in(uint32_t /*serial*/, struct ::zwp_tablet_v2 * /*tablet*/, struct ::wl_surface *surface) override
|
|
|
|
{
|
|
|
|
surfaceApproximated[surface]++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void zwp_tablet_tool_v2_frame(uint32_t time) override
|
|
|
|
{
|
|
|
|
Q_EMIT frame(time);
|
|
|
|
}
|
|
|
|
|
|
|
|
QHash<struct ::wl_surface *, int> surfaceApproximated;
|
|
|
|
Q_SIGNALS:
|
|
|
|
void frame(quint32 time);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TabletSeat : public QObject, public QtWayland::zwp_tablet_seat_v2
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabletSeat(::zwp_tablet_seat_v2 *seat)
|
|
|
|
: QtWayland::zwp_tablet_seat_v2(seat)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void zwp_tablet_seat_v2_tablet_added(struct ::zwp_tablet_v2 *id) override
|
|
|
|
{
|
|
|
|
m_tablets << new Tablet(id);
|
|
|
|
Q_EMIT tabletAdded();
|
|
|
|
}
|
|
|
|
void zwp_tablet_seat_v2_tool_added(struct ::zwp_tablet_tool_v2 *id) override
|
|
|
|
{
|
|
|
|
m_tools << new Tool(id);
|
|
|
|
Q_EMIT toolAdded();
|
|
|
|
}
|
|
|
|
|
2020-12-16 01:46:33 +00:00
|
|
|
void zwp_tablet_seat_v2_pad_added(struct ::zwp_tablet_pad_v2 *id) override
|
|
|
|
{
|
|
|
|
m_pads << new TabletPad(id);
|
|
|
|
Q_EMIT padAdded();
|
|
|
|
}
|
|
|
|
|
2023-10-19 06:50:15 +00:00
|
|
|
QList<Tablet *> m_tablets;
|
|
|
|
QList<TabletPad *> m_pads;
|
|
|
|
QList<Tool *> m_tools;
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
2020-12-16 01:46:33 +00:00
|
|
|
void padAdded();
|
2020-02-12 15:20:38 +00:00
|
|
|
void toolAdded();
|
|
|
|
void tabletAdded();
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestTabletInterface : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TestTabletInterface()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
~TestTabletInterface() override;
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void initTestCase();
|
|
|
|
void testAdd();
|
2020-12-16 01:46:33 +00:00
|
|
|
void testAddPad();
|
2023-10-22 14:15:55 +00:00
|
|
|
void testInteractSimple_data();
|
2020-02-12 15:20:38 +00:00
|
|
|
void testInteractSimple();
|
2023-10-22 14:15:55 +00:00
|
|
|
void testInteractSurfaceChange_data();
|
2020-02-12 15:20:38 +00:00
|
|
|
void testInteractSurfaceChange();
|
|
|
|
|
|
|
|
private:
|
|
|
|
KWayland::Client::ConnectionThread *m_connection;
|
|
|
|
KWayland::Client::EventQueue *m_queue;
|
|
|
|
KWayland::Client::Compositor *m_clientCompositor;
|
|
|
|
KWayland::Client::Seat *m_clientSeat = nullptr;
|
|
|
|
|
|
|
|
QThread *m_thread;
|
2023-09-13 17:59:29 +00:00
|
|
|
KWin::Display m_display;
|
2020-02-12 15:20:38 +00:00
|
|
|
SeatInterface *m_seat;
|
|
|
|
CompositorInterface *m_serverCompositor;
|
|
|
|
|
|
|
|
TabletSeat *m_tabletSeatClient = nullptr;
|
2023-10-22 14:15:55 +00:00
|
|
|
TabletSeat *m_tabletSeatClient2 = nullptr;
|
|
|
|
|
2020-11-04 17:17:26 +00:00
|
|
|
TabletManagerV2Interface *m_tabletManager;
|
2023-10-19 06:50:15 +00:00
|
|
|
QList<KWayland::Client::Surface *> m_surfacesClient;
|
2020-02-12 15:20:38 +00:00
|
|
|
|
2020-11-04 17:17:26 +00:00
|
|
|
TabletV2Interface *m_tablet;
|
2020-12-16 01:46:33 +00:00
|
|
|
TabletPadV2Interface *m_tabletPad = nullptr;
|
2020-11-04 17:17:26 +00:00
|
|
|
TabletToolV2Interface *m_tool;
|
2020-02-12 15:20:38 +00:00
|
|
|
|
2023-10-19 06:50:15 +00:00
|
|
|
QList<SurfaceInterface *> m_surfaces;
|
2020-02-12 15:20:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const QString s_socketName = QStringLiteral("kwin-wayland-server-tablet-test-0");
|
|
|
|
|
|
|
|
void TestTabletInterface::initTestCase()
|
|
|
|
{
|
2020-10-19 15:52:56 +00:00
|
|
|
m_display.addSocketName(s_socketName);
|
2020-02-12 15:20:38 +00:00
|
|
|
m_display.start();
|
|
|
|
QVERIFY(m_display.isRunning());
|
|
|
|
|
2020-12-09 20:13:19 +00:00
|
|
|
m_seat = new SeatInterface(&m_display, this);
|
|
|
|
m_serverCompositor = new CompositorInterface(&m_display, this);
|
|
|
|
m_tabletManager = new TabletManagerV2Interface(&m_display, this);
|
2020-07-04 08:54:47 +00:00
|
|
|
|
2020-02-12 15:20:38 +00:00
|
|
|
connect(m_serverCompositor, &CompositorInterface::surfaceCreated, this, [this](SurfaceInterface *surface) {
|
|
|
|
m_surfaces += surface;
|
|
|
|
});
|
|
|
|
|
|
|
|
// setup connection
|
|
|
|
m_connection = new KWayland::Client::ConnectionThread;
|
|
|
|
QSignalSpy connectedSpy(m_connection, &KWayland::Client::ConnectionThread::connected);
|
|
|
|
m_connection->setSocketName(s_socketName);
|
|
|
|
|
|
|
|
m_thread = new QThread(this);
|
|
|
|
m_connection->moveToThread(m_thread);
|
|
|
|
m_thread->start();
|
|
|
|
|
|
|
|
m_connection->initConnection();
|
|
|
|
QVERIFY(connectedSpy.wait());
|
|
|
|
QVERIFY(!m_connection->connections().isEmpty());
|
|
|
|
|
|
|
|
m_queue = new KWayland::Client::EventQueue(this);
|
|
|
|
QVERIFY(!m_queue->isValid());
|
|
|
|
m_queue->setup(m_connection);
|
|
|
|
QVERIFY(m_queue->isValid());
|
|
|
|
|
|
|
|
auto registry = new KWayland::Client::Registry(this);
|
|
|
|
connect(registry, &KWayland::Client::Registry::interfaceAnnounced, this, [this, registry](const QByteArray &interface, quint32 name, quint32 version) {
|
|
|
|
if (interface == "zwp_tablet_manager_v2") {
|
|
|
|
auto tabletClient = new QtWayland::zwp_tablet_manager_v2(registry->registry(), name, version);
|
|
|
|
auto _seat = tabletClient->get_tablet_seat(*m_clientSeat);
|
|
|
|
m_tabletSeatClient = new TabletSeat(_seat);
|
2023-10-22 14:15:55 +00:00
|
|
|
auto _seat2 = tabletClient->get_tablet_seat(*m_clientSeat);
|
|
|
|
m_tabletSeatClient2 = new TabletSeat(_seat2);
|
2020-02-12 15:20:38 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
connect(registry, &KWayland::Client::Registry::seatAnnounced, this, [this, registry](quint32 name, quint32 version) {
|
|
|
|
m_clientSeat = registry->createSeat(name, version);
|
|
|
|
});
|
|
|
|
registry->setEventQueue(m_queue);
|
|
|
|
QSignalSpy compositorSpy(registry, &KWayland::Client::Registry::compositorAnnounced);
|
|
|
|
registry->create(m_connection->display());
|
|
|
|
QVERIFY(registry->isValid());
|
|
|
|
registry->setup();
|
|
|
|
wl_display_flush(m_connection->display());
|
|
|
|
|
|
|
|
QVERIFY(compositorSpy.wait());
|
|
|
|
m_clientCompositor = registry->createCompositor(compositorSpy.first().first().value<quint32>(), compositorSpy.first().last().value<quint32>(), this);
|
|
|
|
QVERIFY(m_clientCompositor->isValid());
|
|
|
|
|
|
|
|
QSignalSpy surfaceSpy(m_serverCompositor, &CompositorInterface::surfaceCreated);
|
|
|
|
for (int i = 0; i < 3; ++i) {
|
2020-12-16 01:46:33 +00:00
|
|
|
m_surfacesClient += m_clientCompositor->createSurface(this);
|
2020-02-12 15:20:38 +00:00
|
|
|
}
|
|
|
|
QVERIFY(surfaceSpy.count() < 3 && surfaceSpy.wait(200));
|
|
|
|
QVERIFY(m_surfaces.count() == 3);
|
|
|
|
QVERIFY(m_tabletSeatClient);
|
|
|
|
}
|
|
|
|
|
|
|
|
TestTabletInterface::~TestTabletInterface()
|
|
|
|
{
|
|
|
|
if (m_queue) {
|
|
|
|
delete m_queue;
|
|
|
|
m_queue = nullptr;
|
|
|
|
}
|
|
|
|
if (m_thread) {
|
|
|
|
m_thread->quit();
|
|
|
|
m_thread->wait();
|
|
|
|
delete m_thread;
|
|
|
|
m_thread = nullptr;
|
|
|
|
}
|
|
|
|
delete m_tabletSeatClient;
|
2023-10-22 14:15:55 +00:00
|
|
|
delete m_tabletSeatClient2;
|
2020-02-12 15:20:38 +00:00
|
|
|
m_connection->deleteLater();
|
|
|
|
m_connection = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
void TestTabletInterface::testAdd()
|
|
|
|
{
|
2020-11-04 17:17:26 +00:00
|
|
|
TabletSeatV2Interface *seatInterface = m_tabletManager->seat(m_seat);
|
2020-02-12 15:20:38 +00:00
|
|
|
QVERIFY(seatInterface);
|
|
|
|
|
|
|
|
QSignalSpy tabletSpy(m_tabletSeatClient, &TabletSeat::tabletAdded);
|
|
|
|
m_tablet = seatInterface->addTablet(1, 2, QStringLiteral("event33"), QStringLiteral("my tablet"), {QStringLiteral("/test/event33")});
|
|
|
|
QVERIFY(m_tablet);
|
|
|
|
QVERIFY(tabletSpy.wait() || tabletSpy.count() == 1);
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_tablets.count(), 1);
|
|
|
|
|
|
|
|
QSignalSpy toolSpy(m_tabletSeatClient, &TabletSeat::toolAdded);
|
2023-09-13 17:59:29 +00:00
|
|
|
m_tool = seatInterface->addTool(KWin::TabletToolV2Interface::Pen, 0, 0, {TabletToolV2Interface::Tilt, TabletToolV2Interface::Pressure}, "my tablet");
|
2020-02-12 15:20:38 +00:00
|
|
|
QVERIFY(m_tool);
|
|
|
|
QVERIFY(toolSpy.wait() || toolSpy.count() == 1);
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_tools.count(), 1);
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
QVERIFY(!m_tool->isClientSupported()); // There's no surface in it yet
|
2020-02-12 15:20:38 +00:00
|
|
|
m_tool->setCurrentSurface(nullptr);
|
2021-08-29 05:11:06 +00:00
|
|
|
QVERIFY(!m_tool->isClientSupported()); // There's no surface in it
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
QCOMPARE(m_surfaces.count(), 3);
|
|
|
|
for (SurfaceInterface *surface : m_surfaces) {
|
|
|
|
m_tool->setCurrentSurface(surface);
|
|
|
|
}
|
|
|
|
m_tool->setCurrentSurface(nullptr);
|
|
|
|
}
|
|
|
|
|
2020-12-16 01:46:33 +00:00
|
|
|
void TestTabletInterface::testAddPad()
|
|
|
|
{
|
|
|
|
TabletSeatV2Interface *seatInterface = m_tabletManager->seat(m_seat);
|
|
|
|
QVERIFY(seatInterface);
|
|
|
|
|
|
|
|
QSignalSpy tabletPadSpy(m_tabletSeatClient, &TabletSeat::padAdded);
|
2021-08-29 05:11:06 +00:00
|
|
|
m_tabletPad =
|
|
|
|
seatInterface->addTabletPad(QStringLiteral("my tablet pad"), QStringLiteral("tabletpad"), {QStringLiteral("/test/event33")}, 1, 1, 1, 1, 0, m_tablet);
|
2020-12-16 01:46:33 +00:00
|
|
|
QVERIFY(m_tabletPad);
|
|
|
|
QVERIFY(tabletPadSpy.wait() || tabletPadSpy.count() == 1);
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_pads.count(), 1);
|
|
|
|
QVERIFY(m_tabletSeatClient->m_pads[0]);
|
|
|
|
|
|
|
|
QVERIFY(m_tabletPad->ring(0));
|
|
|
|
QVERIFY(m_tabletPad->strip(0));
|
|
|
|
|
|
|
|
QCOMPARE(m_surfaces.count(), 3);
|
|
|
|
QVERIFY(m_tabletSeatClient->m_pads[0]->buttonStates.isEmpty());
|
|
|
|
QSignalSpy buttonSpy(m_tabletSeatClient->m_pads[0], &TabletPad::buttonReceived);
|
|
|
|
m_tabletPad->setCurrentSurface(m_surfaces[0], m_tablet);
|
2022-12-21 00:55:20 +00:00
|
|
|
m_tabletPad->sendButton(123ms, 0, QtWayland::zwp_tablet_pad_v2::button_state_pressed);
|
2020-12-16 01:46:33 +00:00
|
|
|
QVERIFY(buttonSpy.count() || buttonSpy.wait(100));
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_pads[0]->doneCalled, true);
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_pads[0]->buttonStates.count(), 1);
|
|
|
|
QCOMPARE(m_tabletSeatClient->m_pads[0]->buttonStates[*m_surfacesClient[0]][0], QtWayland::zwp_tablet_pad_v2::button_state_pressed);
|
|
|
|
}
|
|
|
|
|
2020-02-12 15:20:38 +00:00
|
|
|
static uint s_serial = 0;
|
2023-10-22 14:15:55 +00:00
|
|
|
|
|
|
|
void TestTabletInterface::testInteractSimple_data()
|
|
|
|
{
|
|
|
|
QTest::addColumn<TabletSeat *>("tabletSeatClient");
|
|
|
|
QTest::newRow("first client") << m_tabletSeatClient;
|
|
|
|
QTest::newRow("second client") << m_tabletSeatClient2;
|
|
|
|
}
|
|
|
|
|
2020-02-12 15:20:38 +00:00
|
|
|
void TestTabletInterface::testInteractSimple()
|
|
|
|
{
|
2023-10-22 14:15:55 +00:00
|
|
|
QFETCH(TabletSeat *, tabletSeatClient);
|
|
|
|
tabletSeatClient->m_tools[0]->surfaceApproximated.clear();
|
|
|
|
QSignalSpy frameSpy(tabletSeatClient->m_tools[0], &Tool::frame);
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
QVERIFY(!m_tool->isClientSupported());
|
|
|
|
m_tool->setCurrentSurface(m_surfaces[0]);
|
|
|
|
QVERIFY(m_tool->isClientSupported() && m_tablet->isSurfaceSupported(m_surfaces[0]));
|
|
|
|
m_tool->sendProximityIn(m_tablet);
|
|
|
|
m_tool->sendPressure(0);
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
m_tool->sendMotion({3, 3});
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
m_tool->sendProximityOut();
|
|
|
|
QVERIFY(m_tool->isClientSupported());
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
QVERIFY(!m_tool->isClientSupported());
|
|
|
|
|
|
|
|
QVERIFY(frameSpy.wait(500));
|
2023-10-22 14:15:55 +00:00
|
|
|
QCOMPARE(tabletSeatClient->m_tools[0]->surfaceApproximated.count(), 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void TestTabletInterface::testInteractSurfaceChange_data()
|
|
|
|
{
|
|
|
|
QTest::addColumn<TabletSeat *>("tabletSeatClient");
|
|
|
|
QTest::newRow("first client") << m_tabletSeatClient;
|
|
|
|
QTest::newRow("second client") << m_tabletSeatClient2;
|
2020-02-12 15:20:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void TestTabletInterface::testInteractSurfaceChange()
|
|
|
|
{
|
2023-10-22 14:15:55 +00:00
|
|
|
QFETCH(TabletSeat *, tabletSeatClient);
|
|
|
|
tabletSeatClient->m_tools[0]->surfaceApproximated.clear();
|
|
|
|
QSignalSpy frameSpy(tabletSeatClient->m_tools[0], &Tool::frame);
|
|
|
|
|
2020-02-12 15:20:38 +00:00
|
|
|
QVERIFY(!m_tool->isClientSupported());
|
|
|
|
m_tool->setCurrentSurface(m_surfaces[0]);
|
|
|
|
QVERIFY(m_tool->isClientSupported() && m_tablet->isSurfaceSupported(m_surfaces[0]));
|
|
|
|
m_tool->sendProximityIn(m_tablet);
|
|
|
|
m_tool->sendPressure(0);
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
|
|
|
|
m_tool->setCurrentSurface(m_surfaces[1]);
|
|
|
|
QVERIFY(m_tool->isClientSupported());
|
|
|
|
|
|
|
|
m_tool->sendMotion({3, 3});
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
m_tool->sendProximityOut();
|
|
|
|
QVERIFY(m_tool->isClientSupported());
|
|
|
|
m_tool->sendFrame(s_serial++);
|
|
|
|
QVERIFY(!m_tool->isClientSupported());
|
|
|
|
|
|
|
|
QVERIFY(frameSpy.wait(500));
|
2023-10-22 14:15:55 +00:00
|
|
|
QCOMPARE(tabletSeatClient->m_tools[0]->surfaceApproximated.count(), 2);
|
2020-02-12 15:20:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QTEST_GUILESS_MAIN(TestTabletInterface)
|
|
|
|
#include "test_tablet_interface.moc"
|