Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 27375)
@@ -25,4 +25,5 @@
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QMainWindow>
 #include <QTimer>
 #ifdef Q_WS_MAC
@@ -40,5 +41,4 @@
 #include "UIFrameBuffer.h"
 #include "UIMachineViewFullscreen.h"
-#include "QIMainDialog.h"
 
 UIMachineViewFullscreen::UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
@@ -95,6 +95,6 @@
     {
         /* Get machine window: */
-        QIMainDialog *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                       qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
         /* If this slot is invoked directly then use the passed size otherwise get
@@ -172,6 +172,6 @@
 {
     /* Who are we watching? */
-    QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+    QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                               qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
     if (pWatched != 0 && pWatched == pMainDialog)
@@ -220,5 +220,5 @@
 #ifdef Q_WS_MAC // TODO: Is it really needed? See UIMachineViewSeamless::eventFilter(...);
     /* Menu bar filter: */
-    qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
+    qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
 #endif
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 27375)
@@ -40,5 +40,5 @@
 
 UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId)
-    : QIWithRetranslateUI2<QIMainDialog>(0, Qt::FramelessWindowHint)
+    : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint)
     , UIMachineWindow(pMachineLogic, uScreenId)
     , m_pMainMenu(0)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 27375)
@@ -24,7 +24,9 @@
 #define __UIMachineWindowFullscreen_h__
 
+/* Global includes */
+#include <QMainWindow>
+
 /* Local includes */
 #include "QIWithRetranslateUI.h"
-#include "QIMainDialog.h"
 #include "UIMachineWindow.h"
 #ifdef Q_WS_X11
@@ -35,5 +37,5 @@
 class VBoxMiniToolBar;
 
-class UIMachineWindowFullscreen : public QIWithRetranslateUI2<QIMainDialog>, public UIMachineWindow
+class UIMachineWindowFullscreen : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
 {
     Q_OBJECT;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27375)
@@ -25,4 +25,5 @@
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QMainWindow>
 #include <QMenuBar>
 #include <QScrollBar>
@@ -37,5 +38,4 @@
 #include "UIFrameBuffer.h"
 #include "UIMachineViewNormal.h"
-#include "QIMainDialog.h"
 
 UIMachineViewNormal::UIMachineViewNormal(  UIMachineWindow *pMachineWindow
@@ -96,6 +96,6 @@
     {
         /* Get machine window: */
-        QIMainDialog *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                       qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
         /* If this slot is invoked directly then use the passed size otherwise get
@@ -156,5 +156,5 @@
                     /* Trying to get menu-bar: */
                     QMenuBar *pMenuBar = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                         qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar() : 0;
+                                         qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar() : 0;
 
                     /* If menu-bar is present and have actions: */
@@ -191,6 +191,6 @@
 {
     /* Who are we watching? */
-    QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+    QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                               qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
     if (pWatched != 0 && pWatched == pMainDialog)
@@ -233,5 +233,5 @@
 
     /* Menu bar filters: */
-    qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
+    qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
 }
 
@@ -333,5 +333,5 @@
         QRect windowGeo = machineWindowWrapper()->machineWindow()->frameGeometry();
         /* The area taken up by the machine central widget, so excluding all decorations: */
-        QRect centralWidgetGeo = static_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry();
+        QRect centralWidgetGeo = static_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry();
         /* To work out how big we can make the console window while still fitting on the desktop,
          * we calculate availableGeometry() - (windowGeo - centralWidgetGeo).
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 27375)
@@ -44,5 +44,5 @@
 
 UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId)
-    : QIWithRetranslateUI2<QIMainDialog>(0, Qt::Window)
+    : QIWithRetranslateUI2<QMainWindow>(0, Qt::Window)
     , UIMachineWindow(pMachineLogic, uScreenId)
     , m_pIndicatorsPool(new UIIndicatorsPool(pMachineLogic->uisession()->session(), this))
@@ -292,5 +292,5 @@
             break;
     }
-    return QIWithRetranslateUI2<QIMainDialog>::event(pEvent);
+    return QIWithRetranslateUI2<QMainWindow>::event(pEvent);
 }
 
@@ -598,7 +598,4 @@
 void UIMachineWindowNormal::showSimple()
 {
-    /* Diable auto centering: */
-    setAutoCenteringEnabled(false);
-
     /* Just show window: */
     show();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 27375)
@@ -25,4 +25,5 @@
 
 /* Global includes */
+#include <QMainWindow>
 #include <QLabel>
 
@@ -30,5 +31,4 @@
 #include "VBoxDefs.h"
 #include "QIWithRetranslateUI.h"
-#include "QIMainDialog.h"
 #include "UIMachineWindow.h"
 #ifdef Q_WS_X11
@@ -41,5 +41,5 @@
 class QIStateIndicator;
 
-class UIMachineWindowNormal : public QIWithRetranslateUI2<QIMainDialog>, public UIMachineWindow
+class UIMachineWindowNormal : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
 {
     Q_OBJECT;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27375)
@@ -25,4 +25,5 @@
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QMainWindow>
 #include <QTimer>
 #ifdef Q_WS_MAC
@@ -39,5 +40,4 @@
 #include "UIFrameBuffer.h"
 #include "UIMachineViewSeamless.h"
-#include "QIMainDialog.h"
 
 UIMachineViewSeamless::UIMachineViewSeamless(  UIMachineWindow *pMachineWindow
@@ -100,6 +100,6 @@
     {
         /* Get machine window: */
-        QIMainDialog *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                       qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
         /* If this slot is invoked directly then use the passed size otherwise get
@@ -186,6 +186,6 @@
 {
     /* Who are we watching? */
-    QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;
+    QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                               qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
 
     if (pWatched != 0 && pWatched == pMainDialog)
@@ -234,5 +234,5 @@
 #ifdef Q_WS_MAC // TODO: Is it really needed? See UIMachineViewSeamless::eventFilter(...);
     /* Menu bar filter: */
-    qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
+    qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);
 #endif
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27375)
@@ -45,5 +45,5 @@
 
 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId)
-    : QIWithRetranslateUI2<QIMainDialog>(0, Qt::FramelessWindowHint)
+    : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint)
     , UIMachineWindow(pMachineLogic, uScreenId)
     , m_pMainMenu(0)
@@ -162,5 +162,5 @@
             break;
     }
-    return QIMainDialog::event(pEvent);
+    return QMainWindow::event(pEvent);
 }
 #endif /* Q_WS_MAC */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27374)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27375)
@@ -24,7 +24,9 @@
 #define __UIMachineWindowSeamless_h__
 
+/* Global includes */
+#include <QMainWindow>
+
 /* Local includes */
 #include "QIWithRetranslateUI.h"
-#include "QIMainDialog.h"
 #include "UIMachineWindow.h"
 #ifdef Q_WS_X11
@@ -35,5 +37,5 @@
 class VBoxMiniToolBar;
 
-class UIMachineWindowSeamless : public QIWithRetranslateUI2<QIMainDialog>, public UIMachineWindow
+class UIMachineWindowSeamless : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow
 {
     Q_OBJECT;
