Commit 22018ee0 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Rename methods to send press and release events in PointerInterface

This makes the naming scheme consistent. Most methods don't use past
tense to describe what we send, i.e. sendMotion instead of sendMoved.
parent 5cadfe7f
Pipeline #53672 canceled with stage
......@@ -190,7 +190,7 @@ void PointerInterface::setFocusedSurface(SurfaceInterface *surface, const QPoint
emit focusedSurfaceChanged();
}
void PointerInterface::sendPressed(quint32 button, quint32 serial)
void PointerInterface::sendPress(quint32 button, quint32 serial)
{
if (!d->focusedSurface) {
return;
......@@ -203,7 +203,7 @@ void PointerInterface::sendPressed(quint32 button, quint32 serial)
}
}
void PointerInterface::sendReleased(quint32 button, quint32 serial)
void PointerInterface::sendRelease(quint32 button, quint32 serial)
{
if (!d->focusedSurface) {
return;
......
......@@ -60,8 +60,8 @@ public:
*/
static PointerInterface *get(wl_resource *native);
void sendPressed(quint32 button, quint32 serial);
void sendReleased(quint32 button, quint32 serial);
void sendPress(quint32 button, quint32 serial);
void sendRelease(quint32 button, quint32 serial);
void sendAxis(Qt::Orientation orientation, qreal delta, qint32 discreteDelta, PointerAxisSource source);
void sendMotion(const QPointF &position);
void sendFrame();
......
......@@ -885,7 +885,7 @@ void SeatInterface::pointerButtonPressed(quint32 button)
// ignore
return;
}
d->pointer->sendPressed(button, serial);
d->pointer->sendPress(button, serial);
if (focusedPointerSurface() == focusedKeyboardSurface()) {
if (d->keyboard) {
......@@ -919,7 +919,7 @@ void SeatInterface::pointerButtonReleased(quint32 button)
d->endDrag(serial);
return;
}
d->pointer->sendReleased(button, serial);
d->pointer->sendRelease(button, serial);
}
void SeatInterface::pointerFrame()
......@@ -1256,7 +1256,7 @@ void SeatInterface::touchUp(qint32 id)
if (id == 0 && d->globalTouch.focus.touchs.isEmpty()) {
// Client did not bind touch, fall back to emulating with pointer events.
const quint32 serial = display()->nextSerial();
d->pointer->sendReleased(BTN_LEFT, serial);
d->pointer->sendRelease(BTN_LEFT, serial);
d->pointer->sendFrame();
}
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment