backends/fakeinput: Implement fake-input v5
This commit is contained in:
parent
c29238f51a
commit
6029a68433
3 changed files with 14 additions and 1 deletions
|
@ -524,6 +524,8 @@ public:
|
|||
|
||||
class FakeInput : public QtWayland::org_kde_kwin_fake_input
|
||||
{
|
||||
public:
|
||||
~FakeInput() override;
|
||||
};
|
||||
|
||||
enum class AdditionalWaylandInterface {
|
||||
|
|
|
@ -260,6 +260,11 @@ CursorShapeDeviceV1::~CursorShapeDeviceV1()
|
|||
destroy();
|
||||
}
|
||||
|
||||
FakeInput::~FakeInput()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
static struct
|
||||
{
|
||||
KWayland::Client::ConnectionThread *connection = nullptr;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
static const quint32 s_version = 4;
|
||||
static const quint32 s_version = 5;
|
||||
|
||||
class FakeInputBackendPrivate : public QtWaylandServer::org_kde_kwin_fake_input
|
||||
{
|
||||
|
@ -42,6 +42,7 @@ protected:
|
|||
void org_kde_kwin_fake_input_touch_frame(Resource *resource) override;
|
||||
void org_kde_kwin_fake_input_pointer_motion_absolute(Resource *resource, wl_fixed_t x, wl_fixed_t y) override;
|
||||
void org_kde_kwin_fake_input_keyboard_key(Resource *resource, uint32_t button, uint32_t state) override;
|
||||
void org_kde_kwin_fake_input_destroy(Resource *resource) override;
|
||||
};
|
||||
|
||||
QList<quint32> FakeInputBackendPrivate::touchIds = QList<quint32>();
|
||||
|
@ -59,6 +60,11 @@ void FakeInputBackendPrivate::org_kde_kwin_fake_input_bind_resource(Resource *re
|
|||
Q_EMIT q->deviceAdded(device);
|
||||
}
|
||||
|
||||
void FakeInputBackendPrivate::org_kde_kwin_fake_input_destroy(Resource *resource)
|
||||
{
|
||||
wl_resource_destroy(resource->handle);
|
||||
}
|
||||
|
||||
void FakeInputBackendPrivate::org_kde_kwin_fake_input_destroy_resource(Resource *resource)
|
||||
{
|
||||
auto it = devices.find(resource);
|
||||
|
|
Loading…
Reference in a new issue