UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId) : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint) , UIMachineWindow(pMachineLogic, uScreenId) , m_pMainMenu(0) , m_pMiniToolBar(0) { /* "This" is machine window: */ m_pMachineWindow = this; /* Set the main window in VBoxGlobal: */ if (uScreenId == 0) vboxGlobal().setMainWindow(this); /* Prepare fullscreen window icon: */ prepareWindowIcon(); /* Prepare console connections: */ prepareConsoleConnections(); /* Prepare fullscreen menu: */ prepareMenu(); /* Prepare machine view container: */ prepareMachineViewContainer(); /* Prepare fullscreen machine view: */ prepareMachineView(); /* Prepare handlers: */ prepareHandlers(); /* Prepare mini tool-bar: */ prepareMiniToolBar(); /* Retranslate fullscreen window finally: */ retranslateUi(); /* Update all the elements: */ updateAppearanceOf(UIVisualElement_AllStuff); /* Make sure the window is placed on valid screen * before we are show fullscreen window: */ sltPlaceOnScreen(); /* Show fullscreen window: */ showFullScreen(); /* Make sure the window is placed on valid screen again * after window is shown & window's decorations applied. * That is required due to X11 Window Geometry Rules. */ sltPlaceOnScreen(); #ifdef Q_WS_MAC /* Make sure it is really on the right place (especially on the Mac) */ QRect r = QApplication::desktop()->screenGeometry(static_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId)); move(r.topLeft()); #endif /* Q_WS_MAC */ }
UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId) : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint) , UIMachineWindow(pMachineLogic, uScreenId) , m_pMainMenu(0) #ifndef Q_WS_MAC , m_pMiniToolBar(0) #endif /* Q_WS_MAC */ { /* "This" is machine window: */ m_pMachineWindow = this; /* Set the main window in VBoxGlobal: */ if (uScreenId == 0) vboxGlobal().setMainWindow(this); /* Prepare seamless window icon: */ prepareWindowIcon(); /* Prepare console connections: */ prepareConsoleConnections(); /* Prepare seamless window: */ prepareSeamless(); /* Prepare seamless menu: */ prepareMenu(); /* Prepare machine view container: */ prepareMachineViewContainer(); /* Prepare seamless machine view: */ prepareMachineView(); /* Prepare handlers: */ prepareHandlers(); #ifndef Q_WS_MAC /* Prepare mini tool-bar: */ prepareMiniToolBar(); #endif /* Q_WS_MAC */ /* Retranslate fullscreen window finally: */ retranslateUi(); #ifdef Q_WS_MAC /* Load seamless window settings: */ loadWindowSettings(); #endif /* Q_WS_MAC */ /* Update all the elements: */ updateAppearanceOf(UIVisualElement_AllStuff); /* Show window: */ showSeamless(); }