VirtualBox

Changeset 50521 in vbox


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

FE/Qt: Mac OS X: 7016: Multi-screen support: Check if that is really necessary to enter/exit fullscreen mode for particular window.

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

    r50520 r50521  
    158158        /* Request 'normal' (window) visual-state: */
    159159        uisession()->setRequestedVisualState(UIVisualStateType_Normal);
    160         /* Toggle native fullscreen mode for each window: */
    161         foreach (UIMachineWindow *pMachineWindow, machineWindows())
    162             darwinToggleFullscreenMode(pMachineWindow);
     160        /* Exit native fullscreen mode for each window: */
     161        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     162            if (darwinIsInFullscreenMode(pMachineWindow))
     163                darwinToggleFullscreenMode(pMachineWindow);
    163164    }
    164165}
     
    174175        /* Request 'seamless' visual-state: */
    175176        uisession()->setRequestedVisualState(UIVisualStateType_Seamless);
    176         /* Toggle native fullscreen mode for each window: */
    177         foreach (UIMachineWindow *pMachineWindow, machineWindows())
    178             darwinToggleFullscreenMode(pMachineWindow);
     177        /* Exit native fullscreen mode for each window: */
     178        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     179            if (darwinIsInFullscreenMode(pMachineWindow))
     180                darwinToggleFullscreenMode(pMachineWindow);
    179181    }
    180182}
     
    190192        /* Request 'scale' visual-state: */
    191193        uisession()->setRequestedVisualState(UIVisualStateType_Scale);
    192         /* Toggle native fullscreen mode for each window: */
    193         foreach (UIMachineWindow *pMachineWindow, machineWindows())
    194             darwinToggleFullscreenMode(pMachineWindow);
     194        /* Exit native fullscreen mode for each window: */
     195        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     196            if (darwinIsInFullscreenMode(pMachineWindow))
     197                darwinToggleFullscreenMode(pMachineWindow);
    195198    }
    196199}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r50505 r50521  
    7979    AssertReturnVoid(vboxGlobal().osRelease() > MacOSXRelease_Lion);
    8080
    81     /* Toggle native fullscreen mode: */
    82     darwinToggleFullscreenMode(this);
     81    /* Enter native fullscreen mode: */
     82    if (!darwinIsInFullscreenMode(this))
     83        darwinToggleFullscreenMode(this);
    8384}
    8485#endif /* RT_OS_DARWIN */
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