Make sure tablet coordinates take decorations into account

Fixes a small awkward offset on some applicaitons.

BUG: 423833


(cherry picked from commit 311094ad8b)
master
Aleix Pol 2020-07-03 15:44:13 +00:00 committed by Aleix Pol Gonzalez
parent 6c9026628c
commit 89fca06bdb
1 changed files with 2 additions and 2 deletions

View File

@ -1563,7 +1563,7 @@ static KWaylandServer::SeatInterface *findSeat()
}
/**
* Useful when there's no proper tablet support on the clients
* Handles input coming from a tablet device (e.g. wacom) often with a pen
*/
class TabletInputFilter : public QObject, public InputEventFilter
{
@ -1715,7 +1715,7 @@ public:
switch (event->type()) {
case QEvent::TabletMove: {
const auto pos = event->globalPosF() - toplevel->pos();
const auto pos = event->globalPosF() - toplevel->bufferGeometry().topLeft();
tool->sendMotion(pos);
m_cursorByTool[tool]->setPos(event->globalPos());
break;