Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 46256)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 46283)
@@ -264,4 +264,5 @@
     }
     lock(); /* See comment in setView(). */
+    m_syncVisibleRegion = reg;
     if (m_pMachineView)
         QApplication::postEvent(m_pMachineView, new UISetRegionEvent(reg));
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 46256)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 46283)
@@ -237,9 +237,21 @@
     ulong m_width;
     ulong m_height;
-    QRegion m_visibleRegion;
     QSize m_scaledSize;
     int64_t m_WinId;
     bool m_fIsDeleted;
 
+    /* To avoid a seamless flicker,
+     * which caused by the latency between the
+     * initial visible-region arriving from EMT thread
+     * and actual visible-region application on GUI thread
+     * it was decided to use two visible-region instances:
+     * 1. 'Sync-one' which being updated synchronously by locking EMT thread,
+     *               and used for immediate manual clipping of the painting operations.
+     * 2. 'Async-one' which updated asynchronously by posting async-event from EMT to GUI thread,
+                      which is used to update viewport parts for visible-region changes,
+                      because NotifyUpdate doesn't take into account these changes. */
+    QRegion m_syncVisibleRegion;
+    QRegion m_asyncVisibleRegion;
+
 #if defined (Q_OS_WIN32)
 private:
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp	(revision 46256)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp	(revision 46283)
@@ -56,7 +56,12 @@
 {
     /* Invalidate visible-region if necessary: */
-    if (m_width != pEvent->width() ||
-        m_height != pEvent->height())
-        m_visibleRegion = QRegion();
+    if (m_pMachineView->machineLogic()->visualStateType() == UIVisualStateType_Seamless &&
+        (m_width != pEvent->width() || m_height != pEvent->height()))
+    {
+        lock();
+        m_syncVisibleRegion = QRegion();
+        m_asyncVisibleRegion = QRegion();
+        unlock();
+    }
 
     /* Remember new width/height: */
@@ -175,18 +180,18 @@
 void UIFrameBufferQImage::applyVisibleRegionEvent(UISetRegionEvent *pEvent)
 {
-    /* Make sure visible-region changed: */
-    if (m_visibleRegion == pEvent->region())
-        return;
-
-    /* Compose viewport region to update: */
-    QRegion toUpdate = pEvent->region() + m_visibleRegion;
-    /* Remember new visible-region: */
-    m_visibleRegion = pEvent->region();
-    /* Update viewport region finally: */
-    m_pMachineView->viewport()->update(toUpdate);
+    /* Make sure async visible-region changed: */
+    if (m_asyncVisibleRegion == pEvent->region())
+        return;
+
+    /* We are accounting async visible-regions one-by-one
+     * to keep corresponding viewport area always updated! */
+    m_pMachineView->viewport()->update(pEvent->region() + m_asyncVisibleRegion);
+    m_asyncVisibleRegion = pEvent->region();
+
 #ifdef Q_WS_X11
     /* Qt 4.8.3 under X11 has Qt::WA_TranslucentBackground window attribute broken,
-     * so we are still have to use old one known Xshape extension wrapped by the widget setMask API: */
-    m_pMachineView->machineWindow()->setMask(m_visibleRegion);
+     * so we are also have to use async visible-region to apply to [Q]Widget [set]Mask
+     * which internally wraps old one known (approved) Xshape extension: */
+    m_pMachineView->machineWindow()->setMask(m_asyncVisibleRegion);
 #endif /* Q_WS_X11 */
 }
@@ -226,6 +231,10 @@
     painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
 
+    /* Manually clip paint rectangle using visible-region: */
+    lock();
+    QRegion visiblePaintRegion = m_syncVisibleRegion & paintRect;
+    unlock();
+
     /* Repaint all the rectangles of visible-region: */
-    QRegion visiblePaintRegion = m_visibleRegion & paintRect;
     foreach (const QRect &rect, visiblePaintRegion.rects())
     {
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp	(revision 46256)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp	(revision 46283)
@@ -465,12 +465,12 @@
 void UIFrameBufferQuartz2D::applyVisibleRegionEvent(UISetRegionEvent *pEvent)
 {
-    /* Make sure visible-region changed: */
-    if (m_visibleRegion == pEvent->region())
+    /* Make sure async visible-region changed: */
+    if (m_asyncVisibleRegion == pEvent->region())
         return;
 
-    /* Remember new visible-region: */
-    m_visibleRegion = pEvent->region();
-    /* Invalidate whole the viewport: */
+    /* We are handling the fact of async visible-region change
+     * to invalidate whole the viewport area! */
     ::darwinWindowInvalidateShape(m_pMachineView->viewport());
+    m_asyncVisibleRegion = pEvent->region();
 }
 
