Changeset View
Changeset View
Standalone View
Standalone View
src/client/fakeinput.cpp
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | |||||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | void FakeInput::requestPointerMove(const QSizeF &delta) | 97 | void FakeInput::requestPointerMove(const QSizeF &delta) | ||
98 | { | 98 | { | ||
99 | Q_ASSERT(d->manager.isValid()); | 99 | Q_ASSERT(d->manager.isValid()); | ||
100 | org_kde_kwin_fake_input_pointer_motion(d->manager, wl_fixed_from_double(delta.width()), wl_fixed_from_double(delta.height())); | 100 | org_kde_kwin_fake_input_pointer_motion(d->manager, wl_fixed_from_double(delta.width()), wl_fixed_from_double(delta.height())); | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | void FakeInput::requestPointerMoveAbsolute(const QPointF &pos) | ||||
104 | { | ||||
105 | Q_ASSERT(d->manager.isValid()); | ||||
106 | org_kde_kwin_fake_input_pointer_motion_absolute(d->manager, wl_fixed_from_double(pos.x()), wl_fixed_from_double(pos.y())); | ||||
davidedmundson: if (wl_proxy_get_version(d->manager) < ORG_KDE_SOMETHING_SOMETHING_FAKE_INPUT_VERSION) {… | |||||
Use curly braces even when the body of a conditional statement contains only one line. zzag: Use curly braces even when the body of a conditional statement contains only one line. | |||||
107 | } | ||||
108 | | ||||
103 | void FakeInput::Private::sendPointerButtonState(Qt::MouseButton button, quint32 state) | 109 | void FakeInput::Private::sendPointerButtonState(Qt::MouseButton button, quint32 state) | ||
104 | { | 110 | { | ||
105 | #if HAVE_LINUX_INPUT_H | 111 | #if HAVE_LINUX_INPUT_H | ||
106 | Q_ASSERT(manager.isValid()); | 112 | Q_ASSERT(manager.isValid()); | ||
107 | uint32_t b = 0; | 113 | uint32_t b = 0; | ||
108 | switch (button) { | 114 | switch (button) { | ||
109 | case Qt::LeftButton: | 115 | case Qt::LeftButton: | ||
110 | b = BTN_LEFT; | 116 | b = BTN_LEFT; | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |
if (wl_proxy_get_version(d->manager) < ORG_KDE_SOMETHING_SOMETHING_FAKE_INPUT_VERSION) {
return;
}