Index: /trunk/src/VBox/Main/include/DisplayImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 50827)
+++ /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 50828)
@@ -355,5 +355,5 @@
     void vbvaReleaseCmd(VBVACMDHDR *pHdr, int32_t cbCmd);
 
-    void handleResizeCompletedEMT(void);
+    void handleResizeCompletedEMT(unsigned uScreenId);
 
     RTCRITSECT mVBVALock;
Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 50827)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 50828)
@@ -980,5 +980,5 @@
 
     /* The method also unlocks the framebuffer. */
-    handleResizeCompletedEMT();
+    handleResizeCompletedEMT(uScreenId);
 
     return VINF_SUCCESS;
@@ -991,11 +991,15 @@
  *  @thread EMT
  */
-void Display::handleResizeCompletedEMT (void)
+void Display::handleResizeCompletedEMT(unsigned uScreenId)
 {
     LogRelFlowFunc(("\n"));
 
-    unsigned uScreenId;
-    for (uScreenId = 0; uScreenId < mcMonitors; uScreenId++)
-    {
+    do /* to use 'break' */
+    {
+        if (uScreenId >= mcMonitors)
+        {
+            break;
+        }
+
         DISPLAYFBINFO *pFBInfo = &maFramebuffers[uScreenId];
 
@@ -1006,5 +1010,6 @@
         {
             /* This is not the display that has completed resizing. */
-            continue;
+            AssertFailed();
+            break;
         }
 
@@ -1021,5 +1026,5 @@
             handleDisplayResize (uScreenId, pFBInfo->pendingResize.bpp, pFBInfo->pendingResize.pvVRAM,
                                  pFBInfo->pendingResize.cbLine, pFBInfo->pendingResize.w, pFBInfo->pendingResize.h, pFBInfo->pendingResize.flags);
-            continue;
+            break;
         }
 
@@ -1073,7 +1078,4 @@
         }
         LogRelFlow(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat));
-
-        /* Repaint the display because VM continued to run during the framebuffer resize. */
-        InvalidateAndUpdateEMT(this, uScreenId, false);
 
         /* Handle the case if there are some saved visible region that needs to be
@@ -1131,5 +1133,5 @@
         }
 #endif /* VBOX_WITH_CROGL */
-    }
+    } while(0);
 }
 
@@ -3839,5 +3841,5 @@
             fNoUpdate = true; /* Always set it here, because pfnUpdateDisplayAll can cause a new resize. */
             /* The framebuffer was resized and display data need to be updated. */
-            pDisplay->handleResizeCompletedEMT ();
+            pDisplay->handleResizeCompletedEMT(uScreenId);
             if (pFBInfo->u32ResizeStatus != ResizeStatus_Void)
             {
@@ -3845,4 +3847,8 @@
                 continue;
             }
+
+            /* Repaint the display because VM continued to run during the framebuffer resize. */
+            pDisplay->InvalidateAndUpdateEMT(pDisplay, uScreenId, false);
+
             /* Continue with normal processing because the status here is ResizeStatus_Void. */
         }
