VirtualBox

Changeset 57046 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 21, 2015 4:39:41 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Visual-mode adjustment code: Few more appropriate comments for full-screen/seamless modes.

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

Legend:

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

    r57045 r57046  
    354354    AssertPtrReturnVoid(pFullscreenLogic);
    355355
    356 #ifdef Q_WS_MAC
    357     /* ML and next using native stuff: */
    358     const bool fSupportsNativeFullScreen = vboxGlobal().osRelease() > MacOSXRelease_Lion;
    359 #endif /* Q_WS_MAC */
    360 
    361356    /* Make sure window should be shown and mapped to some host-screen: */
    362357    if (!uisession()->isScreenVisible(m_uScreenId) ||
     
    382377
    383378#ifdef Q_WS_X11
    384         /* On X11 calling placeOnScreen() is only needed for legacy window managers
    385          * which we do not test, so this is 'best effort' code. With window managers which
    386          * support the _NET_WM_FULLSCREEN_MONITORS protocol this would interfere unreliable. */
     379        /* If WM doesn't support native stuff, we need to call for placeOnScreen(): */
    387380        const bool fSupportsNativeFullScreen = VBoxGlobal::supportsFullScreenMonitorsProtocolX11() &&
    388381                                               !gEDataManager->legacyFullscreenModeRequested();
    389382        if (!fSupportsNativeFullScreen)
     383        {
     384            /* Make sure window have appropriate geometry: */
    390385            placeOnScreen();
     386        }
    391387#else /* !Q_WS_X11 */
    392         /* Make sure window is maximized and placed on valid screen: */
     388        /* Make sure window have appropriate geometry: */
    393389        placeOnScreen();
    394390#endif /* !Q_WS_X11 */
     
    397393        /* ML and next using native stuff, so we can call for simple show(),
    398394         * Lion and previous using Qt stuff, so we should call for showFullScreen(): */
     395        const bool fSupportsNativeFullScreen = vboxGlobal().osRelease() > MacOSXRelease_Lion;
    399396        if (fSupportsNativeFullScreen)
     397        {
     398            /* Show window in normal mode: */
    400399            show();
     400        }
    401401        else
     402        {
     403            /* Show window in fullscreen mode: */
    402404            showFullScreen();
     405        }
    403406#else /* !Q_WS_MAC */
    404         /* Show in fullscreen mode: */
     407        /* Show window in fullscreen mode: */
    405408        showFullScreen();
    406409#endif /* !Q_WS_MAC */
    407410
    408411#ifdef Q_WS_X11
     412        /* If WM supports native stuff, we need to map window to corresponding host-screen. */
    409413        if (fSupportsNativeFullScreen)
    410414        {
    411             /* Tell recent window managers which screen this window should be mapped to.
    412              * Apparently some window managers will not respond to requests for
    413              * unmapped windows, so do this *after* the call to showFullScreen(). */
     415            /* Tell recent window managers which host-screen this window should be mapped to: */
    414416            VBoxGlobal::setFullScreenMonitorX11(this, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId));
    415         }
    416         else
    417         {
    418             /* On X11 calling placeOnScreen() is only needed for legacy window managers
    419              * which we do not test, so this is 'best effort' code. With window managers which
    420              * support the _NET_WM_FULLSCREEN_MONITORS protocol this would interfere unreliable. */
    421             placeOnScreen();
    422417        }
    423418#endif /* Q_WS_X11 */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r57045 r57046  
    214214        placeOnScreen();
    215215
    216         /* Show in normal mode: */
     216        /* Show window in normal mode: */
    217217        show();
    218218
     
    225225        {
    226226# if   defined(Q_WS_WIN)
    227             /* Show mini-toolbar: */
     227            /* Show mini-toolbar in normal mode: */
    228228            m_pMiniToolBar->show();
    229229# elif defined(Q_WS_X11)
    230             /* Allow mini-toolbar to be located on available area: */
     230            /* Show mini-toolbar in maximized mode: */
    231231            m_pMiniToolBar->showMaximized();
    232232# endif /* Q_WS_X11 */
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