From cec215e0e3adaf26c89c4ffbaa53f87481772f0c Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Mon, 4 Apr 2022 11:25:22 +0200 Subject: 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 Tested-by: Jenkins --- vcl/qt5/QtFrame.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl/qt5') 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() -- cgit