SeatInterface: Expose firstTouchPointPosition

This exposes "globalTouch.focus.firstTouchPos" so other things can use
it in place of "pointerPos" when touch is being used.
This commit is contained in:
Arjen Hiemstra 2021-10-25 16:53:13 +02:00
parent 6ffe79dab8
commit 10eb1aa0b9
2 changed files with 6 additions and 0 deletions

View file

@ -1005,6 +1005,11 @@ TouchInterface *SeatInterface::touch() const
return d->touch.data();
}
QPointF SeatInterface::firstTouchPointPosition() const
{
return d->globalTouch.focus.firstTouchPos;
}
void SeatInterface::setFocusedTouchSurface(SurfaceInterface *surface, const QPointF &surfacePosition)
{
if (!d->touch) {

View file

@ -582,6 +582,7 @@ public:
void notifyTouchFrame();
void notifyTouchCancel();
bool isTouchSequence() const;
QPointF firstTouchPointPosition() const;
/**
* @returns true if there is a touch sequence going on associated with a touch
* down of the given @p serial.