Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 27423)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 27424)
@@ -57,5 +57,7 @@
     CSession& session() const;
 
+    /* Public members: */
     virtual void reshow() {}
+    virtual void setMask(const QRegion &region) { machineWindow()->setMask(region); }
 
 protected:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27423)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27424)
@@ -158,5 +158,5 @@
             {
                 m_lastVisibleRegion = pSetRegionEvent->region();
-                machineWindowWrapper()->machineWindow()->setMask(m_lastVisibleRegion);
+                machineWindowWrapper()->setMask(m_lastVisibleRegion);
             }
             return true;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27423)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27424)
@@ -356,4 +356,8 @@
     QRegion region = constRegion;
 
+    /* Shift region if left spacer width is NOT zero or top spacer height is NOT zero: */
+    if (m_pLeftSpacer->geometry().width() || m_pTopSpacer->geometry().height())
+        region.translate(m_pLeftSpacer->geometry().width(), m_pTopSpacer->geometry().height());
+
 #if 0 // TODO: Is it really needed now?
     /* The global mask shift cause of toolbars and such things. */
@@ -361,8 +365,11 @@
 #endif
 
-    /* Including mini tool-bar area */
-    QRegion toolBarRegion(m_pMiniToolBar->mask());
-    toolBarRegion.translate(m_pMiniToolBar->mapToGlobal(toolBarRegion.boundingRect().topLeft()) - QPoint(1, 0));
-    region += toolBarRegion;
+    /* Including mini tool-bar area: */
+    if (m_pMiniToolBar)
+    {
+        QRegion toolBarRegion(m_pMiniToolBar->mask());
+        toolBarRegion.translate(m_pMiniToolBar->mapToGlobal(toolBarRegion.boundingRect().topLeft()) - QPoint(1, 0));
+        region += toolBarRegion;
+    }
 
 #if 0 // TODO: Is it really needed now?
@@ -432,11 +439,2 @@
 }
 
-void UIMachineWindowSeamless::clearMask()
-{
-#ifdef Q_WS_WIN
-    SetWindowRgn(winId(), 0, TRUE);
-#else
-    QMainWindow::clearMask();
-#endif
-}
-
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27423)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27424)
@@ -101,5 +101,4 @@
     void showSeamless();
     void setMask(const QRegion &region);
-    void clearMask();
 
     /* Private variables: */
