11#include "wayland/qwayland-server-fake-input.h"
16static const quint32 s_version = 5;
28 std::map<Resource *, std::unique_ptr<FakeInputDevice>>
devices;
59 devices[resource] = std::unique_ptr<FakeInputDevice>(device);
65 wl_resource_destroy(resource->handle);
70 auto it =
devices.find(resource);
72 const auto [resource, device] = std::move(*it);
85 return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch());
103 const QPointF delta(wl_fixed_to_double(delta_x), wl_fixed_to_double(delta_y));
118 case WL_POINTER_BUTTON_STATE_PRESSED:
121 case WL_POINTER_BUTTON_STATE_RELEASED:
141 case WL_POINTER_AXIS_HORIZONTAL_SCROLL:
145 case WL_POINTER_AXIS_VERTICAL_SCROLL:
167 Q_EMIT device->
touchDown(
id, QPointF(wl_fixed_to_double(x), wl_fixed_to_double(y)),
currentTime(), device);
179 Q_EMIT device->
touchMotion(
id, QPointF(wl_fixed_to_double(x), wl_fixed_to_double(y)),
currentTime(), device);
234 case WL_KEYBOARD_KEY_STATE_PRESSED:
238 case WL_KEYBOARD_KEY_STATE_RELEASED:
258 d->init(*d->display, s_version);
263#include "moc_fakeinputbackend.cpp"
Class holding the Wayland server display loop.