summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2020-02-21 00:37:04 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2020-02-22 09:01:33 +0100
commit4fe30879af391c32074a003a7a6ddd45431d212a (patch)
treebc83e65de49484c5b02cb9e56147cf251f02043e /vcl/qt5
parent50ccb7e82b7053306721cbe220323be072306a29 (diff)
tdf#130827 Qt5 report frame-relative cursor pos
Qt5Frame::GetPointerState expects the cursor position relative to the frame position. Change-Id: Icaf7dcd8fc80d712f5138a9f9b843ccf345c5543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89244 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Frame.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 4a6075999096..2f6738485fb0 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1143,6 +1143,7 @@ SalFrame::SalPointerState Qt5Frame::GetPointerState()
{
SalPointerState aState;
aState.maPos = toPoint(QCursor::pos());
+ aState.maPos.Move(-maGeometry.nX, -maGeometry.nY);
aState.mnState = GetMouseModCode(QGuiApplication::mouseButtons())
| GetKeyModCode(QGuiApplication::keyboardModifiers());
return aState;