VirtualBox

Ignore:
Timestamp:
Mar 2, 2010 9:46:36 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: fixes for fs after the initial mm support

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r26921 r26931  
    5757
    5858    /* Prepare machine window: */
    59     prepareMachineWindow();
     59    prepareMachineWindows();
    6060
    6161    /* Initialization: */
     
    136136}
    137137
    138 void UIMachineLogicFullscreen::prepareMachineWindow()
    139 {
    140     /* Do not prepare window if its ready: */
    141     if (mainMachineWindow())
     138void UIMachineLogicFullscreen::prepareMachineWindows()
     139{
     140    /* Get monitor count: */
     141    ulong uMonitorCount = session().GetMachine().GetMonitorCount();
     142
     143    /* Do not create window(s) if created already: */
     144    if ((ulong)machineWindows().size() == uMonitorCount)
    142145        return;
     146
     147    /* List should not be filled partially: */
     148    AssertMsg(machineWindows().size() == 0, ("Windows list is filled partially, something broken!\n"));
    143149
    144150#ifdef Q_WS_MAC
     
    148154#endif /* Q_WS_MAC */
    149155
    150     /* Create machine window: */
    151     addMachineWindow(UIMachineWindow::create(this, visualStateType()));
     156    /* Create machine window(s): */
     157    for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId)
     158        addMachineWindow(UIMachineWindow::create(this, visualStateType(), uScreenId));
     159    /* Order machine window(s): */
     160    for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId)
     161        machineWindows()[uScreenId - 1]->machineWindow()->raise();
     162
     163    /* Notify others about machine window(s) created: */
     164    setMachineWindowsCreated(true);
    152165
    153166    /* If we are not started yet: */
     
    165178        if (uisession()->isFirstTimeStarted())
    166179        {
    167             UIFirstRunWzd wzd(mainMachineWindow()->machineWindow(), machine);
     180            UIFirstRunWzd wzd(defaultMachineWindow()->machineWindow(), machine);
    168181            wzd.exec();
    169182        }
     
    172185        CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ?
    173186                             console.PowerUpPaused() : console.PowerUp();
    174         /* Check for an immediate failure */
     187
     188#if 0 // TODO: Check immediate failure!
     189        /* Check for an immediate failure: */
    175190        if (!console.isOk())
    176191        {
    177192            vboxProblem().cannotStartMachine(console);
    178             mainMachineWindow()->machineWindow()->close();
     193            machineWindowWrapper()->machineWindow()->close();
    179194            return;
    180195        }
     
    182197        /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
    183198        setPreventAutoClose(true);
     199#endif
    184200
    185201        /* Show "Starting/Restoring" progress dialog: */
    186202        if (uisession()->isSaved())
    187             vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow(), 0);
     203            vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow(), 0);
    188204        else
    189             vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow());
    190 
     205            vboxProblem().showModalProgressDialog(progress, machine.GetName(), defaultMachineWindow()->machineWindow());
     206
     207#if 0 // TODO: Check immediate failure!
    191208        /* Check for an progress failure */
    192209        if (progress.GetResultCode() != 0)
    193210        {
    194211            vboxProblem().cannotStartMachine(progress);
    195             mainMachineWindow()->machineWindow()->close();
     212            machineWindowWrapper()->machineWindow()->close();
    196213            return;
    197214        }
    198 
    199         /* Process pending events: */
    200         qApp->processEvents();
    201215
    202216        /* Enable auto-closure again: */
     
    206220        if (uisession()->isTurnedOff())
    207221        {
    208             mainMachineWindow()->machineWindow()->close();
     222            machineWindowWrapper()->machineWindow()->close();
    209223            return;
    210224        }
     225#endif
    211226
    212227#if 0 // TODO: Rework debugger logic!
     
    228243
    229244            if (!vboxGlobal().isStartPausedEnabled())
    230                 mainMachineWindow()->machineView()->pause (false);
     245                machineWindowWrapper()->machineView()->pause (false);
    231246        }
    232247# endif
     
    243258{
    244259    /* Do not cleanup machine window if it is not present: */
    245     if (!mainMachineWindow())
     260    if (!isMachineWindowsCreated())
    246261        return;
    247262
    248263    /* Cleanup machine window: */
    249     UIMachineWindow::destroy(mainMachineWindow());
    250 }
    251 
     264    foreach (UIMachineWindow *pMachineWindow, machineWindows())
     265        UIMachineWindow::destroy(pMachineWindow);
     266}
     267
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r26889 r26931  
    5353    /* Prepare helpers: */
    5454    void prepareActionConnections();
    55     void prepareMachineWindow();
     55    void prepareMachineWindows();
    5656    void prepareRequiredFeatures();
    5757
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r26921 r26931  
    126126
    127127            /* Send new size-hint to the guest: */
    128             session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, 0);
     128            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
    129129        }
    130130        /* We had requested resize now, rejecting accident requests: */
     
    331331
    332332            /* Report to the VM thread that we finished resizing */
    333             session().GetConsole().GetDisplay().ResizeCompleted(0);
     333            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
    334334
    335335            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r26921 r26931  
    284284#endif
    285285                                           , machineLogic()->visualStateType()
    286                                            , 0 /* Pass a primary screen id (0) for now! */);
     286                                           , m_uScreenId);
    287287
    288288    /* Add machine view into layout: */
     
    335335#endif/* !Q_WS_MAC */
    336336
     337//    m_pMachineView->normalizeGeometry(true);
     338//    ((UIMachineViewFullscreen*)m_pMachineView)->sltPerformGuestResize(maximumSize());
     339//    show();
     340
    337341    QRect r = geometry();
    338342    /* Load global settings: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette