From 89fca06bdb2696129a241ab02a4dddba483c46a2 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 3 Jul 2020 15:44:13 +0000 Subject: [PATCH] Make sure tablet coordinates take decorations into account Fixes a small awkward offset on some applicaitons. BUG: 423833 (cherry picked from commit 311094ad8be4c76df2a4655fe71e7085fa9c4e14) --- input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input.cpp b/input.cpp index 2fadcb4c68..0c7cbce92b 100644 --- a/input.cpp +++ b/input.cpp @@ -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;