VirtualBox

Changeset 50520 in vbox for trunk/src/VBox


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

FE/Qt: Mac OS X: 7016: Multi-screen support: Make sure other window(s) exit fullscreen too when one of them did.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin-cocoa.mm

    r50505 r50520  
    3838/** Easy way of dynamical call for 10.7 AppKit functionality we do not yet support. */
    3939#define NSWindowCollectionBehaviorFullScreenPrimary (1 << 7)
     40#define NSFullScreenWindowMask (1 << 14)
    4041
    4142NativeNSWindowRef darwinToNativeWindowImpl(NativeNSViewRef pView)
     
    201202    if ([pWindow respondsToSelector: @selector(toggleFullScreen:)])
    202203        [pWindow performSelector: @selector(toggleFullScreen:) withObject: (id)nil];
     204}
     205
     206bool darwinIsInFullscreenMode(NativeNSWindowRef pWindow)
     207{
     208    /* Check whether passed pWindow is in native fullscreen mode. */
     209    return [pWindow styleMask] & NSFullScreenWindowMask;
    203210}
    204211
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.cpp

    r50505 r50520  
    152152{
    153153    return ::darwinToggleFullscreenMode(::darwinToNativeWindow(pWidget));
     154}
     155
     156bool darwinIsInFullscreenMode(QWidget *pWidget)
     157{
     158    return ::darwinIsInFullscreenMode(::darwinToNativeWindow(pWidget));
    154159}
    155160
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/VBoxUtils-darwin.h

    r50505 r50520  
    8282void darwinEnableTransienceSupport(NativeNSWindowRef pWindow);
    8383void darwinToggleFullscreenMode(NativeNSWindowRef pWindow);
     84bool darwinIsInFullscreenMode(NativeNSWindowRef pWindow);
    8485bool darwinScreensHaveSeparateSpaces();
    8586
     
    247248void darwinEnableTransienceSupport(QWidget *pWidget);
    248249void darwinToggleFullscreenMode(QWidget *pWidget);
     250bool darwinIsInFullscreenMode(QWidget *pWidget);
    249251bool darwinOpenFile(const QString &strFile);
    250252
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r50498 r50520  
    126126    Q_UNUSED(fResult);
    127127
    128     /* Exit fullscreen mode if there is/are no fullscreen window(s) left: */
    129     if (m_fullscreenMachineWindows.isEmpty())
     128    /* If there is/are still fullscreen window(s) present: */
     129    if (!m_fullscreenMachineWindows.isEmpty())
     130    {
     131        /* Ask remain window(s) to exit fullscreen too: */
     132        foreach (UIMachineWindow *pMachineWindow, machineWindows())
     133            if (darwinIsInFullscreenMode(pMachineWindow))
     134                darwinToggleFullscreenMode(pMachineWindow);
     135    }
     136    /* If there is/are no more fullscreen window(s) left: */
     137    else
    130138    {
    131139        /* Change visual-state to requested: */
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