VirtualBox

Changeset 30348 in vbox


Ignore:
Timestamp:
Jun 21, 2010 6:23:20 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: New running VM core: Moving fIsAutoCaptureDisabled flag from UIMachineView to UISession as thats flag common for whole ui session.

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

Legend:

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

    r30347 r30348  
    206206    , m_desktopGeometryType(DesktopGeo_Invalid)
    207207    , m_iLastMouseWheelDelta(0)
    208     , m_bIsAutoCaptureDisabled(false)
    209208    , m_bIsKeyboardCaptured(false)
    210209    , m_bIsHostkeyPressed(false)
     
    12641263    {
    12651264#ifdef Q_WS_WIN32
    1266         if (!m_bIsAutoCaptureDisabled && m_globalSettings.autoCapture() && GetAncestor(winId(), GA_ROOT) == GetForegroundWindow())
     1265        if (!uisession()->isAutoCaptureDisabled() && m_globalSettings.autoCapture() && GetAncestor(winId(), GA_ROOT) == GetForegroundWindow())
    12671266#else
    1268         if (!m_bIsAutoCaptureDisabled && m_globalSettings.autoCapture())
     1267        if (!uisession()->isAutoCaptureDisabled() && m_globalSettings.autoCapture())
    12691268#endif
    12701269        {
     
    12731272
    12741273        /* Reset the single-time disable capture flag: */
    1275         if (m_bIsAutoCaptureDisabled)
    1276             m_bIsAutoCaptureDisabled = false;
     1274        if (uisession()->isAutoCaptureDisabled())
     1275            uisession()->setAutoCaptureDisabled(false);
    12771276    }
    12781277    else
     
    14461445                             * the capture state is to be defined by the
    14471446                             * dialog result itself */
    1448                             m_bIsAutoCaptureDisabled = true;
     1447                            uisession()->setAutoCaptureDisabled(true);
    14491448                            bool autoConfirmed = false;
    14501449                            ok = vboxProblem().confirmInputCapture (&autoConfirmed);
    14511450                            if (autoConfirmed)
    1452                                 m_bIsAutoCaptureDisabled = false;
     1451                                uisession()->setAutoCaptureDisabled(false);
    14531452                            /* otherwise, the disable flag will be reset in
    14541453                             * the next console view's foucs in event (since
     
    17751774                    /* Temporarily disable auto capture that will take place after this dialog is dismissed because
    17761775                     * the capture state is to be defined by the dialog result itself: */
    1777                     m_bIsAutoCaptureDisabled = true;
     1776                    uisession()->setAutoCaptureDisabled(true);
    17781777                    bool autoConfirmed = false;
    17791778                    bool ok = vboxProblem().confirmInputCapture(&autoConfirmed);
    17801779                    if (autoConfirmed)
    1781                         m_bIsAutoCaptureDisabled = false;
     1780                        uisession()->setAutoCaptureDisabled(false);
    17821781                    /* Otherwise, the disable flag will be reset in the next console view's foucs in event (since
    17831782                     * may happen asynchronously on some platforms, after we return from this code): */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r30347 r30348  
    229229    uint8_t m_pressedKeysCopy[128];
    230230
    231     bool m_bIsAutoCaptureDisabled : 1;
    232231    bool m_bIsKeyboardCaptured : 1;
    233232    bool m_bIsHostkeyPressed : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r30323 r30348  
    559559    , m_fIsGuestResizeIgnored(false)
    560560    , m_fIsSeamlessModeRequested(false)
     561    , m_fIsAutoCaptureDisabled(false)
    561562    /* Guest additions flags: */
    562563    , m_fIsGuestAdditionsActive(false)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r29485 r30348  
    102102    bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
    103103    bool isSeamlessModeRequested() const { return m_fIsSeamlessModeRequested; }
     104    bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; }
    104105
    105106    /* Guest additions state getters: */
     
    130131    void setGuestResizeIgnored(bool fIsGuestResizeIgnored) { m_fIsGuestResizeIgnored = fIsGuestResizeIgnored; }
    131132    void setSeamlessModeRequested(bool fIsSeamlessModeRequested) { m_fIsSeamlessModeRequested = fIsSeamlessModeRequested; }
     133    void setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) { m_fIsAutoCaptureDisabled = fIsAutoCaptureDisabled; }
    132134
    133135    /* Keyboard setters: */
     
    234236    bool m_fIsGuestResizeIgnored : 1;
    235237    bool m_fIsSeamlessModeRequested : 1;
     238    bool m_fIsAutoCaptureDisabled : 1;
    236239
    237240    /* Guest additions flags: */
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