tablet: transform coordinates according to the output transformations

Uses the same code path we use for the mouse and touch, which was added
after the tablet patches.
This commit is contained in:
Aleix Pol 2020-07-26 18:07:56 +02:00 committed by Aleix Pol Gonzalez
parent 1ad88bdf7c
commit bd7624fdbf

View file

@ -567,8 +567,14 @@ void Connection::processEvents()
capabilities << InputRedirection::Wheel;
}
const auto *output = static_cast<AbstractWaylandOutput*>(
kwinApp()->platform()->enabledOutputs()[tte->device()->screenId()]);
const QPointF globalPos =
devicePointToGlobalPosition(tte->transformedPosition(output->modeSize()),
output);
emit tabletToolEvent(tabletEventType,
tte->transformedPosition(m_size), tte->pressure(),
globalPos, tte->pressure(),
tte->xTilt(), tte->yTilt(), tte->rotation(),
tte->isTipDown(), tte->isNearby(), serial,
toolId, toolType, capabilities, tte->time(),