VirtualBox

Ignore:
Timestamp:
Feb 25, 2014 11:40:33 AM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: 7016: Native fullscreen auto-pilot support: Handling host/guest screen(s) enabling/disabling.

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

Legend:

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

    r50536 r50573  
    150150                pMachineWindow->showInNecessaryMode();
    151151            foreach (UIMachineWindow *pMachineWindow, machineWindows())
    152                 if (   (darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0)
     152                if (   uisession()->isScreenVisible(pMachineWindow->screenId())
     153                    && (darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0)
    153154                    && !darwinIsInFullscreenMode(pMachineWindow))
    154155                    darwinToggleFullscreenMode(pMachineWindow);
     
    262263        setPresentationModeEnabled(true);
    263264    }
    264     /* For ML and next: */
    265     else
    266     {
    267         /* Invalidate and exit fullscreen mode: */
    268         m_fIsFullscreenInvalidated = true;
    269         foreach (UIMachineWindow *pMachineWindow, machineWindows())
    270             if (darwinIsInFullscreenMode(pMachineWindow))
    271                 darwinToggleFullscreenMode(pMachineWindow);
    272     }
     265    /* Invalidate fullscreen mode for ML and next: */
     266    else invalidateFullscreenMode();
    273267#else /* !Q_WS_MAC */
    274268    /* Update machine-window(s) location/size: */
     
    287281        m_pScreenLayout->rebuild();
    288282
     283#ifdef Q_WS_MAC
     284    /* Call to base-class for Lion and previous: */
     285    if (vboxGlobal().osRelease() <= MacOSXRelease_Lion)
     286        UIMachineLogic::sltGuestMonitorChange(changeType, uScreenId, screenGeo);
     287    /* Invalidate fullscreen mode for ML and next: */
     288    else invalidateFullscreenMode();
     289#else /* !Q_WS_MAC */
    289290    /* Call to base-class: */
    290291    UIMachineLogic::sltGuestMonitorChange(changeType, uScreenId, screenGeo);
     292#endif /* !Q_WS_MAC */
    291293}
    292294
     
    298300    m_pScreenLayout->rebuild();
    299301
     302#ifdef Q_WS_MAC
     303    /* Call to base-class for Lion and previous: */
     304    if (vboxGlobal().osRelease() <= MacOSXRelease_Lion)
     305        UIMachineLogic::sltHostScreenCountChanged();
     306    /* Invalidate fullscreen mode for ML and next: */
     307    else invalidateFullscreenMode();
     308#else /* !Q_WS_MAC */
    300309    /* Call to base-class: */
    301310    UIMachineLogic::sltHostScreenCountChanged();
     311#endif /* !Q_WS_MAC */
    302312}
    303313
     
    480490        SetSystemUIMode(kUIModeNormal, 0);
    481491}
    482 #endif /* Q_WS_MAC */
    483 
     492
     493void UIMachineLogicFullscreen::invalidateFullscreenMode()
     494{
     495    /* Make sure 'fullscreen' mode is not invalidated yet: */
     496    if (m_fIsFullscreenInvalidated)
     497        return;
     498
     499    /* Mark 'fullscreen' mode as invalidated: */
     500    m_fIsFullscreenInvalidated = true;
     501
     502    /* Exit fullscreen mode: */
     503    foreach (UIMachineWindow *pMachineWindow, machineWindows())
     504        if (darwinIsInFullscreenMode(pMachineWindow))
     505            darwinToggleFullscreenMode(pMachineWindow);
     506}
     507#endif /* Q_WS_MAC */
     508
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r50536 r50573  
    9595#ifdef Q_WS_MAC
    9696    void setPresentationModeEnabled(bool fEnabled);
     97
     98    /** Mac OS X: Invalidates 'fullscreen' mode. */
     99    void invalidateFullscreenMode();
    97100#endif /* Q_WS_MAC */
    98101
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