summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-04-04 11:25:22 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-04-04 17:35:21 +0200
commitcec215e0e3adaf26c89c4ffbaa53f87481772f0c (patch)
tree187555c663bd34879be1cc0e809a2cba6e552885 /vcl/qt5
parent88bba21f83ce47a517dabc637fb421ac9bad5416 (diff)
tdf#147523 Qt use inner QWidget to set pointer pos
Regression from commit e63fe68fb1d0915b64fdf63f7fa6eed866fa3a0d ("Qt use asChild for pointer positioning"), which should just have been a cleanup for commit ca28826a087245686d7fca3ffc8ca1f03307924d ("tdf#131467 Qt set default position on first resize"). And scale the requested position by the device scale factor. Change-Id: I50b3c628d22896e987d8cc2eaf5635cb12ba3464 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132518 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtFrame.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index a70b6616c0a7..6c2e4757f84a 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -883,7 +883,7 @@ void QtFrame::SetPointerPos(tools::Long nX, tools::Long nY)
{
// some cursor already exists (and it has m_ePointerStyle shape)
// so here we just reposition it
- QCursor::setPos(asChild()->mapToGlobal(QPoint(nX, nY)));
+ QCursor::setPos(m_pQWidget->mapToGlobal(QPoint(nX, nY) / devicePixelRatioF()));
}
void QtFrame::Flush()