diff --git a/test/testmouselocker11/mainwindow.ui b/test/testmouselocker11/mainwindow.ui
index 19156fdb..dd53ab31 100644
--- a/test/testmouselocker11/mainwindow.ui
+++ b/test/testmouselocker11/mainwindow.ui
@@ -85,25 +85,6 @@
-
-
-
- TopToolBarArea
-
-
- false
-
-
-
diff --git a/test/testmouselocker11/qqtmouselocker_win.cpp b/test/testmouselocker11/qqtmouselocker_win.cpp
index 46d95d87..8e648feb 100644
--- a/test/testmouselocker11/qqtmouselocker_win.cpp
+++ b/test/testmouselocker11/qqtmouselocker_win.cpp
@@ -192,13 +192,15 @@ void QQtMouseLockerImpl::mouseMoveEvent ( QMouseEvent* event, QWidget* target )
p0 = w.mapToGlobal ( p0 );
p1 = w.mapToGlobal ( p1 );
- QRect r0 = QRect ( p0, p1 );
- mainWinRect.left = ( LONG ) r0.left();
- mainWinRect.right = ( LONG ) r0.right();
- mainWinRect.top = ( LONG ) r0.top();
- mainWinRect.bottom = ( LONG ) r0.bottom();
+ qreal ratio = w.devicePixelRatioF();
- qr0 = r0;
+ QRect r0 = QRect ( p0, p1 );
+ mainWinRect.left = ( LONG ) r0.left() * ratio;
+ mainWinRect.right = ( LONG ) r0.right() * ratio;
+ mainWinRect.top = ( LONG ) r0.top() * ratio;
+ mainWinRect.bottom = ( LONG ) r0.bottom() * ratio;
+
+ qr0 = QRect ( QPoint ( r0.left() * ratio, r0.top() * ratio ), QPoint ( r0.right() * ratio, r0.bottom() * ratio ) );
}
#endif