VirtualBox

Ignore:
Timestamp:
Feb 20, 2014 11:52:02 AM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Mac OS X: 7016: Multi-screen support: More appropriate place/time for native fullscreen mode enter.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r50492 r50522  
    5656
    5757    /* Public getters: */
     58    ulong screenId() const { return m_uScreenId; }
    5859    UIMachineView* machineView() const { return m_pMachineView; }
    5960    UIMachineLogic* machineLogic() const { return m_pMachineLogic; }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r50521 r50522  
    336336
    337337#ifdef Q_WS_MAC
    338     /* Keep sync for machine-logic/window(s) in ML and next: */
     338    /* On ML and later: */
    339339    if (vboxGlobal().osRelease() > MacOSXRelease_Lion)
    340340    {
    341341        foreach (UIMachineWindow *pMachineWindow, machineWindows())
    342342        {
     343            /* Keep sync for machine-logic/window(s): */
    343344            connect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidEnter()),
    344345                    this, SLOT(sltHandleNativeFullscreenDidEnter()));
    345346            connect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidExit()),
    346347                    this, SLOT(sltHandleNativeFullscreenDidExit()));
     348            /* Enter native fullscreen mode: */
     349            if (darwinScreensHaveSeparateSpaces() || pMachineWindow->screenId() == 0)
     350                if (!darwinIsInFullscreenMode(pMachineWindow))
     351                    darwinToggleFullscreenMode(pMachineWindow);
    347352        }
    348353    }
     
    373378
    374379#ifdef Q_WS_MAC
    375     /* Leave sync for machine-logic/window(s) in ML and next: */
     380    /* On ML and later: */
    376381    if (vboxGlobal().osRelease() > MacOSXRelease_Lion)
    377382    {
    378383        foreach (UIMachineWindow *pMachineWindow, machineWindows())
    379384        {
     385            /* Leave sync for machine-logic/window(s): */
    380386            disconnect(pMachineWindow, SIGNAL(sigNotifyAboutNativeFullscreenDidEnter()),
    381387                       this, SLOT(sltHandleNativeFullscreenDidEnter()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r50521 r50522  
    7373#endif /* Q_WS_MAC */
    7474
    75 #ifdef RT_OS_DARWIN
    76 void UIMachineWindowFullscreen::sltToggleNativeFullscreenMode()
    77 {
    78     /* Make sure this method is only used for ML and next: */
    79     AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion);
    80 
    81     /* Enter native fullscreen mode: */
    82     if (!darwinIsInFullscreenMode(this))
    83         darwinToggleFullscreenMode(this);
    84 }
    85 #endif /* RT_OS_DARWIN */
    86 
    8775void UIMachineWindowFullscreen::sltMachineStateChanged()
    8876{
     
    146134        UICocoaApplication::instance()->registerToNativeNotification("NSWindowDidExitFullScreenNotification", this,
    147135                                                                     UIMachineWindow::handleNativeNotification);
    148         /* Asynchronously toggle fullscreen mode for every screen which requires it: */
    149         if (darwinScreensHaveSeparateSpaces() || m_uScreenId == 0)
    150             QTimer::singleShot(0, this, SLOT(sltToggleNativeFullscreenMode()));
    151136    }
    152137#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h

    r50498 r50522  
    5151private slots:
    5252
    53 #ifdef RT_OS_DARWIN
    54     /** Mac OS X: Toggles native fullscreen mode. */
    55     void sltToggleNativeFullscreenMode();
    56 #endif /* RT_OS_DARWIN */
    57 
    5853    /* Session event-handlers: */
    5954    void sltMachineStateChanged();
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