Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 53962)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 53963)
@@ -290,12 +290,19 @@
     QRect rect(iX, iY, iWidth, iHeight);
 
-    /* Take the scale-factor into account: */
-    const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
-    if (dScaleFactor != 1.0)
-    {
-        rect.moveTo(floor((double)rect.x() * dScaleFactor) - 1,
-                    floor((double)rect.y() * dScaleFactor) - 1);
-        rect.setSize(QSize(ceil((double)rect.width()  * dScaleFactor) + 2,
-                           ceil((double)rect.height() * dScaleFactor) + 2));
+    /* Take the scaling into account: */
+    const double dScaleFactor = frameBuffer()->scaleFactor();
+    const QSize scaledSize = frameBuffer()->scaledSize();
+    if (scaledSize.isValid())
+    {
+        /* Calculate corresponding scale-factors: */
+        const double xScaleFactor = visualStateType() == UIVisualStateType_Scale ?
+                                    (double)scaledSize.width()  / frameBuffer()->width()  : dScaleFactor;
+        const double yScaleFactor = visualStateType() == UIVisualStateType_Scale ?
+                                    (double)scaledSize.height() / frameBuffer()->height() : dScaleFactor;
+        /* Adjust corresponding viewport part: */
+        rect.moveTo(floor((double)rect.x() * xScaleFactor) - 1,
+                    floor((double)rect.y() * yScaleFactor) - 1);
+        rect.setSize(QSize(ceil((double)rect.width()  * xScaleFactor) + 2,
+                           ceil((double)rect.height() * yScaleFactor) + 2));
     }
 
@@ -306,7 +313,7 @@
 #ifdef Q_WS_MAC
     /* Take the backing-scale-factor into account: */
-    if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
-    {
-        const double dBackingScaleFactor = darwinBackingScaleFactor(machineWindow());
+    if (frameBuffer()->useUnscaledHiDPIOutput())
+    {
+        const double dBackingScaleFactor = frameBuffer()->backingScaleFactor();
         if (dBackingScaleFactor > 1.0)
         {
@@ -974,5 +981,5 @@
     if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
     {
-        const double dBackingScaleFactor = darwinBackingScaleFactor(machineWindow());
+        const double dBackingScaleFactor = frameBuffer()->backingScaleFactor();
         if (dBackingScaleFactor > 1.0)
         {
@@ -1002,5 +1009,5 @@
     if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
     {
-        const double dBackingScaleFactor = darwinBackingScaleFactor(machineWindow());
+        const double dBackingScaleFactor = frameBuffer()->backingScaleFactor();
         if (dBackingScaleFactor > 1.0)
         {
@@ -1231,5 +1238,5 @@
         QPainter painter(viewport());
         /* Take the scale-factor into account: */
-        if (gEDataManager->scaleFactor(vboxGlobal().managedVMUuid()) == 1.0)
+        if (frameBuffer()->scaleFactor() == 1.0)
             painter.drawPixmap(rect.topLeft(), pausePixmap());
         else
@@ -1426,5 +1433,5 @@
 {
     /* Take the scale-factor into account: */
-    const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
+    const double dScaleFactor = frameBuffer()->scaleFactor();
     if (dScaleFactor != 1.0)
         size = QSize(size.width() * dScaleFactor, size.height() * dScaleFactor);
@@ -1434,5 +1441,5 @@
     if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
     {
-        const double dBackingScaleFactor = darwinBackingScaleFactor(machineWindow());
+        const double dBackingScaleFactor = frameBuffer()->backingScaleFactor();
         if (dBackingScaleFactor > 1.0)
             size = QSize(size.width() / dBackingScaleFactor, size.height() / dBackingScaleFactor);
@@ -1450,5 +1457,5 @@
     if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
     {
-        const double dBackingScaleFactor = darwinBackingScaleFactor(machineWindow());
+        const double dBackingScaleFactor = frameBuffer()->backingScaleFactor();
         if (dBackingScaleFactor > 1.0)
             size = QSize(size.width() * dBackingScaleFactor, size.height() * dBackingScaleFactor);
@@ -1457,5 +1464,5 @@
 
     /* Take the scale-factor into account: */
-    const double dScaleFactor = gEDataManager->scaleFactor(vboxGlobal().managedVMUuid());
+    const double dScaleFactor = frameBuffer()->scaleFactor();
     if (dScaleFactor != 1.0)
         size = QSize(size.width() / dScaleFactor, size.height() / dScaleFactor);
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 53962)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 53963)
@@ -946,5 +946,5 @@
             if (gEDataManager->useUnscaledHiDPIOutput(vboxGlobal().managedVMUuid()))
             {
-                const double dBackingScaleFactor = darwinBackingScaleFactor(m_windows.value(uScreenId));
+                const double dBackingScaleFactor = pFrameBuffer->backingScaleFactor();
                 if (dBackingScaleFactor > 1.0)
                 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 53962)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 53963)
@@ -101,21 +101,4 @@
     /* Update machine-view sliders: */
     updateSliders();
-}
-
-void UIMachineViewScale::sltHandleNotifyUpdate(int iX, int iY, int iW, int iH)
-{
-    /* Initialize variables for scale mode: */
-    const QSize scaledSize = frameBuffer()->scaledSize();
-    const double xScaleFactor = (double)scaledSize.width()  / frameBuffer()->width();
-    const double yScaleFactor = (double)scaledSize.height() / frameBuffer()->height();
-
-    /* Update corresponding viewport part,
-     * But make sure we update always a bigger rectangle than requested to
-     * catch all rounding errors. (use 1 time the ratio factor and
-     * round down on top/left, but round up for the width/height) */
-    viewport()->update((int)(iX * xScaleFactor) - ((int)xScaleFactor) - 1,
-                       (int)(iY * yScaleFactor) - ((int)yScaleFactor) - 1,
-                       (int)(iW * xScaleFactor) + ((int)xScaleFactor + 2) * 2,
-                       (int)(iH * yScaleFactor) + ((int)yScaleFactor + 2) * 2);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h	(revision 53962)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h	(revision 53963)
@@ -42,7 +42,4 @@
     void sltPerformGuestScale();
 
-    /* Handler: Frame-buffer NotifyUpdate stuff: */
-    void sltHandleNotifyUpdate(int iX, int iY, int iW, int iH);
-
 private:
 
