summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2020-02-21 00:37:04 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2020-02-22 11:06:34 +0100
commit55007b9d2cba31448b1785069b26dcf71c9c122c (patch)
tree234a5247eb680eb2154c3ee8037233a2606dc852 /vcl
parent179322dff3fffa0980cbb246d93dd651e612170f (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> (cherry picked from commit 4fe30879af391c32074a003a7a6ddd45431d212a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89268 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-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 919336553d07..b38b92f143c9 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1133,6 +1133,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;