Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp	(revision 31318)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxCloseVMDlg.cpp	(revision 31319)
@@ -25,4 +25,8 @@
 #include "UIMachineWindowNormal.h"
 
+#ifdef Q_WS_MAC
+# include "VBoxGlobal.h"
+#endif /* Q_WS_MAC */
+
 /* Qt includes */
 #include <QPushButton>
@@ -35,6 +39,5 @@
     /* No sheets in another mode than normal for now. Firstly it looks ugly and
      * secondly in some cases it is broken. */
-    UIMachineWindowNormal *pWnd = qobject_cast<UIMachineWindowNormal*>(aParent);
-    if (pWnd)
+    if (vboxGlobal().isSheetWindowsAllowed(aParent))
         setWindowFlags (Qt::Sheet);
 #endif /* Q_WS_MAC */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp	(revision 31318)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp	(revision 31319)
@@ -41,7 +41,7 @@
     /* No sheets in another mode than normal for now. Firstly it looks ugly and
      * secondly in some cases it is broken. */
-    if (   qobject_cast<UIMachineWindowNormal*>(pParent)
+    if (   vboxGlobal().isSheetWindowsAllowed(pParent)
         || qobject_cast<VBoxSnapshotsWgt*>(pParent))
-        setWindowFlags (Qt::Sheet);
+        setWindowFlags(Qt::Sheet);
 #endif /* Q_WS_MAC */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 31318)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp	(revision 31319)
@@ -66,7 +66,6 @@
     /* No sheets in another mode than normal for now. Firstly it looks ugly and
      * secondly in some cases it is broken. */
-    if (!(   qobject_cast<UIMachineWindowFullscreen*>(aParent)
-          || qobject_cast<UIMachineWindowSeamless*>(aParent)))
-        setWindowFlags (Qt::Sheet);
+    if (vboxGlobal().isSheetWindowsAllowed(aParent))
+        setWindowFlags(Qt::Sheet);
 #endif /* Q_WS_MAC */
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 31318)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 31319)
@@ -40,4 +40,9 @@
 # include "VBoxFBOverlay.h"
 #endif /* VBOX_WITH_VIDEOHWACCEL */
+
+#ifdef Q_WS_MAC
+# include "UIMachineWindowFullscreen.h"
+# include "UIMachineWindowSeamless.h"
+#endif /* Q_WS_MAC */
 
 /* Qt includes */
@@ -4128,4 +4133,13 @@
 
 #endif
+
+#ifdef Q_WS_MAC
+bool VBoxGlobal::isSheetWindowsAllowed(QWidget *pParent) const
+{
+    if (!(   qobject_cast<UIMachineWindowFullscreen*>(pParent)
+          || qobject_cast<UIMachineWindowSeamless*>(pParent)))
+        return true;
+}
+#endif /* Q_WS_MAC */
 
 // Public slots
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 31318)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 31319)
@@ -639,4 +639,8 @@
 #endif
 
+#ifdef Q_WS_MAC
+    bool isSheetWindowsAllowed(QWidget *pParent) const;
+#endif /* Q_WS_MAC */
+
 signals:
 
