summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qcursor.cpp')
-rw-r--r--src/gui/kernel/qcursor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index d6ccaff8ed..455088241c 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -251,7 +251,8 @@ void QCursor::setPos(QScreen *screen, int x, int y)
{
if (screen) {
if (QPlatformCursor *cursor = screen->handle()->cursor()) {
- const QPoint devicePos = QHighDpi::toNativePixels(QPoint(x, y), screen);
+ const QPoint pos(x, y);
+ const QPoint devicePos = QHighDpi::toNativePixels(pos, screen->virtualSiblingAt(pos));
// Need to check, since some X servers generate null mouse move
// events, causing looping in applications which call setPos() on
// every mouse move event.