VirtualBox

Changeset 99438 in vbox


Ignore:
Timestamp:
Apr 18, 2023 9:03:26 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156897
Message:

FE/Qt: bugref:10407. Some refactoring.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r99434 r99438  
    331331#ifdef VBOX_WS_X11
    332332    /* Check whether we have compositing manager running: */
    333     m_fCompositingManagerRunning = NativeWindowSubsystem::isCompositingManagerRunning(X11XServerAvailable());
     333    m_fCompositingManagerRunning = NativeWindowSubsystem::isCompositingManagerRunning(X11ServerAvailable());
    334334
    335335    /* Acquire current Window Manager type: */
    336     m_enmWindowManagerType = NativeWindowSubsystem::windowManagerType(X11XServerAvailable());
     336    m_enmWindowManagerType = NativeWindowSubsystem::windowManagerType(X11ServerAvailable());
    337337#endif /* VBOX_WS_X11 */
    338338
     
    30243024
    30253025#ifdef VBOX_WS_X11
    3026 bool UICommon::X11XServerAvailable() const
     3026bool UICommon::X11ServerAvailable() const
    30273027{
    30283028    return m_enmDisplayServerType == DisplayServerType_XWayland
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r99372 r99438  
    216216        bool isCompositingManagerRunning() const { return m_fCompositingManagerRunning; }
    217217        /** Returns true if the detected display server type is either xorg or xwayland. */
    218         bool X11XServerAvailable() const;
     218        bool X11ServerAvailable() const;
    219219#endif
    220220    /** @} */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICursor.cpp

    r99434 r99438  
    4949        (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
    5050    {
    51         if (NativeWindowSubsystem::checkExtension(uiCommon().X11XServerAvailable(), "RENDER"))
     51        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
    5252            pWidget->setCursor(cursor);
    5353    }
     
    7575        (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
    7676    {
    77         if (NativeWindowSubsystem::checkExtension(uiCommon().X11XServerAvailable(), "RENDER"))
     77        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
    7878            pWidget->setCursor(cursor);
    7979    }
     
    101101        (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
    102102    {
    103         if (NativeWindowSubsystem::checkExtension(uiCommon().X11XServerAvailable(), "RENDER"))
     103        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
    104104            pWidget->unsetCursor();
    105105    }
     
    127127        (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
    128128    {
    129         if (NativeWindowSubsystem::checkExtension(uiCommon().X11XServerAvailable(), "RENDER"))
     129        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
    130130            pWidget->unsetCursor();
    131131    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r99434 r99438  
    790790#ifdef VBOX_WS_X11
    791791# define QWINDOWSIZE_MAX ((1<<24)-1)
    792     if (pWidget->isWindow() && pWidget->isVisible() && uiCommon().X11XServerAvailable())
     792    if (pWidget->isWindow() && pWidget->isVisible() && uiCommon().X11ServerAvailable())
    793793    {
    794794        // WORKAROUND:
     
    862862#elif defined(VBOX_WS_X11)
    863863
    864     fResult &= NativeWindowSubsystem::activateWindow(uiCommon().X11XServerAvailable(), wId, fSwitchDesktop);
     864    fResult &= NativeWindowSubsystem::activateWindow(uiCommon().X11ServerAvailable(), wId, fSwitchDesktop);
    865865
    866866#else
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r99434 r99438  
    21462146{
    21472147#ifdef VBOX_WS_X11
    2148     NativeWindowSubsystem::setWMClass(uiCommon().X11XServerAvailable(), this, "VirtualBox Manager", "VirtualBox Manager");
     2148    NativeWindowSubsystem::setWMClass(uiCommon().X11ServerAvailable(), this, "VirtualBox Manager", "VirtualBox Manager");
    21492149#endif
    21502150
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r99407 r99438  
    11461146
    11471147#ifdef VBOX_WS_X11
    1148     if (uiCommon().X11XServerAvailable())
     1148    if (uiCommon().X11ServerAvailable())
    11491149        /* Resync Qt and X11 Server (see xTracker #7547). */
    11501150        XSync(NativeWindowSubsystem::X11GetDisplay(), false);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r99434 r99438  
    266266
    267267#elif defined(VBOX_WS_X11)
    268         if (uiCommon().X11XServerAvailable())
     268        if (uiCommon().X11ServerAvailable())
    269269        {
    270270            /* On X11, we are using XCB stuff to grab the keyboard.
     
    371371
    372372#elif defined(VBOX_WS_X11)
    373         if (uiCommon().X11XServerAvailable())
     373        if (uiCommon().X11ServerAvailable())
    374374        {
    375375            /* On X11, we are using XCB stuff to grab the keyboard.
     
    10371037    /* Global settings: */
    10381038#ifdef VBOX_WS_X11
    1039     if (uiCommon().X11XServerAvailable())
     1039    if (uiCommon().X11ServerAvailable())
    10401040    {
    10411041        /* Initialize the X keyboard subsystem: */
     
    17881788
    17891789#elif defined(VBOX_WS_X11)
    1790     if (uiCommon().X11XServerAvailable())
     1790    if (uiCommon().X11ServerAvailable())
    17911791    {
    17921792        Q_UNUSED(pHotKey);
     
    18651865
    18661866#elif defined(VBOX_WS_X11)
    1867     if (uiCommon().X11XServerAvailable())
     1867    if (uiCommon().X11ServerAvailable())
    18681868    {
    18691869        Window   wDummy1, wDummy2;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r99434 r99438  
    150150        strWindowName = QString("VirtualBox Machine UUID: %1").arg(uiCommon().managedVMUuid().toString());
    151151    /* Assign WM_CLASS property: */
    152     NativeWindowSubsystem::setWMClass(uiCommon().X11XServerAvailable(), this, strWindowName, strWindowClass);
     152    NativeWindowSubsystem::setWMClass(uiCommon().X11ServerAvailable(), this, strWindowName, strWindowClass);
    153153    /* Tell the WM we are well behaved wrt Xwayland keyboard-grabs: */
    154     NativeWindowSubsystem::setXwaylandMayGrabKeyboardFlag(uiCommon().X11XServerAvailable(), this);
     154    NativeWindowSubsystem::setXwaylandMayGrabKeyboardFlag(uiCommon().X11ServerAvailable(), this);
    155155#endif
    156156}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.cpp

    r99437 r99438  
    573573#elif defined(VBOX_WS_X11)
    574574    /* Initialize the X keyboard subsystem: */
    575     if (uiCommon().X11XServerAvailable())
     575    if (uiCommon().X11ServerAvailable())
    576576        initMappedX11Keyboard(NativeWindowSubsystem::X11GetDisplay(), gEDataManager->remappedScanCodes());
    577577#endif /* VBOX_WS_X11 */
     
    747747
    748748# elif defined(VBOX_WS_X11)
    749     if (uiCommon().X11XServerAvailable())
     749    if (uiCommon().X11ServerAvailable())
    750750    {
    751751        /* Make sure it's generic XCB event: */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette