VirtualBox

Changeset 8292 in vbox for trunk


Ignore:
Timestamp:
Apr 22, 2008 1:41:43 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30046
Message:

Frontends/VirtualBox3/4: seamless mode should only be available when the host is in graphics mode

Location:
trunk/src/VBox/Frontends
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r8219 r8292  
    109109    void mouseStateChanged (int state);
    110110    void machineStateChanged (KMachineState state);
    111     void additionsStateChanged (const QString &, bool, bool);
     111    void additionsStateChanged (const QString &, bool, bool, bool);
    112112    void mediaChanged (VBoxDefs::DiskType aType);
    113113    void networkStateChange();
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r8155 r8292  
    175175    void updateMachineState (KMachineState state);
    176176    void updateMouseState (int state);
    177     void updateAdditionsState (const QString&, bool, bool);
     177    void updateAdditionsState (const QString&, bool, bool, bool);
    178178    void updateNetworkAdarptersState();
    179179    void updateUsbState();
     
    325325    bool mIsSeamless : 1;
    326326    bool mIsSeamlessSupported : 1;
     327    bool mIsGraphicsSupported : 1;
    327328    int normal_wflags;
    328329    bool was_max : 1;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r8219 r8292  
    235235                         const QString &aAddVersion,
    236236                         bool aAddActive,
    237                          bool aSupportsSeamless) :
     237                         bool aSupportsSeamless,
     238                         bool aSupportsGraphics) :
    238239        QEvent ((QEvent::Type) VBoxDefs::AdditionsStateChangeEventType),
    239240        mOsTypeId (aOsTypeId), mAddVersion (aAddVersion),
    240         mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless) {}
     241        mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless),
     242        mSupportsGraphics (aSupportsGraphics) {}
    241243    const QString &osTypeId() const { return mOsTypeId; }
    242244    const QString &additionVersion() const { return mAddVersion; }
    243245    bool additionActive() const { return mAddActive; }
    244246    bool supportsSeamless() const { return mSupportsSeamless; }
     247    bool supportsGraphics() const { return mSupportsGraphics; }
    245248private:
    246249    QString mOsTypeId;
     
    248251    bool mAddActive;
    249252    bool mSupportsSeamless;
     253    bool mSupportsGraphics;
    250254};
    251255
     
    438442                                     guest.GetAdditionsVersion(),
    439443                                     guest.GetAdditionsActive(),
    440                                      guest.GetSupportsSeamless()));
     444                                     guest.GetSupportsSeamless(),
     445                                     guest.GetSupportsGraphics()));
    441446        return S_OK;
    442447    }
     
    11801185                emit additionsStateChanged (ge->additionVersion(),
    11811186                                            ge->additionActive(),
    1182                                             ge->supportsSeamless());
     1187                                            ge->supportsSeamless(),
     1188                                            ge->supportsGraphics());
    11831189                return true;
    11841190            }
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r8213 r8292  
    120120    , mIsSeamless (false)
    121121    , mIsSeamlessSupported (false)
     122    , mIsGraphicsSupported (false)
    122123    , normal_wflags (getWFlags())
    123124    , was_max (false)
     
    798799    connect (console, SIGNAL (machineStateChanged (KMachineState)),
    799800             this, SLOT (updateMachineState (KMachineState)));
    800     connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool)),
    801              this, SLOT (updateAdditionsState (const QString &, bool, bool)));
     801    connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool, bool)),
     802             this, SLOT (updateAdditionsState (const QString &, bool, bool, bool)));
    802803    connect (console, SIGNAL (mediaChanged (VBoxDefs::DiskType)),
    803804             this, SLOT (updateMediaState (VBoxDefs::DiskType)));
     
    943944    /* If seamless mode should be enabled then check if it is enabled
    944945     * currently and re-enable it if seamless is supported */
    945     if (vmSeamlessAction->isOn() && mIsSeamlessSupported)
     946    if (vmSeamlessAction->isOn() && mIsSeamlessSupported && mIsGraphicsSupported)
    946947        toggleFullscreenMode (true, true);
    947948    mIsOpenViewFinished = true;
     
    10631064#endif
    10641065
    1065     vmSeamlessAction->setEnabled (mIsSeamlessSupported);
     1066    vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported);
    10661067    vmFullscreenAction->setEnabled (true);
    10671068
     
    20322033        mIsFullscreen = aOn;
    20332034        vmAdjustWindowAction->setEnabled (!aOn);
    2034         vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported);
     2035        vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported);
    20352036    }
    20362037
     
    22832284{
    22842285    /* check if it is possible to enter/leave seamless mode */
    2285     if (mIsSeamlessSupported || !aOn)
     2286    if (mIsSeamlessSupported && mIsGraphicsSupported || !aOn)
    22862287    {
    22872288        bool ok = toggleFullscreenMode (aOn, true /* aSeamless */);
     
    32283229void VBoxConsoleWnd::updateAdditionsState (const QString &aVersion,
    32293230                                           bool aActive,
    3230                                            bool aSeamlessSupported)
     3231                                           bool aSeamlessSupported,
     3232                                           bool aGraphicsSupported)
    32313233{
    32323234    vmAutoresizeGuestAction->setEnabled (aActive);
    3233     if (mIsSeamlessSupported != aSeamlessSupported)
    3234     {
    3235         vmSeamlessAction->setEnabled (aSeamlessSupported);
     3235    if (  (mIsSeamlessSupported != aSeamlessSupported)
     3236        || (mIsGraphicsSupported != aGraphicsSupported))
     3237    {
     3238        vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported);
    32363239        mIsSeamlessSupported = aSeamlessSupported;
     3240        mIsGraphicsSupported = aGraphicsSupported;
    32373241        /* If seamless mode should be enabled then check if it is enabled
    32383242         * currently and re-enable it if open-view procedure is finished */
    3239         if (vmSeamlessAction->isOn() && mIsOpenViewFinished && aSeamlessSupported)
     3243        if (   vmSeamlessAction->isOn()
     3244            && mIsOpenViewFinished
     3245            && aSeamlessSupported
     3246            && aGraphicsSupported)
    32403247            toggleFullscreenMode (true, true);
    32413248    }
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h

    r8219 r8292  
    126126    void mouseStateChanged (int state);
    127127    void machineStateChanged (KMachineState state);
    128     void additionsStateChanged (const QString &, bool, bool);
     128    void additionsStateChanged (const QString &, bool, bool, bool);
    129129    void mediaChanged (VBoxDefs::DiskType aType);
    130130    void networkStateChange();
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h

    r8155 r8292  
    175175    void updateMachineState (KMachineState state);
    176176    void updateMouseState (int state);
    177     void updateAdditionsState (const QString&, bool, bool);
     177    void updateAdditionsState (const QString&, bool, bool, bool);
    178178    void updateNetworkAdarptersState();
    179179    void updateUsbState();
     
    328328    bool mIsSeamless : 1;
    329329    bool mIsSeamlessSupported : 1;
     330    bool mIsGraphicsSupported : 1;
    330331    bool was_max : 1;
    331332    QObjectList hidden_children;
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r8220 r8292  
    228228                         const QString &aAddVersion,
    229229                         bool aAddActive,
    230                          bool aSupportsSeamless) :
     230                         bool aSupportsSeamless,
     231                         bool aSupportsGraphics) :
    231232        QEvent ((QEvent::Type) VBoxDefs::AdditionsStateChangeEventType),
    232233        mOsTypeId (aOsTypeId), mAddVersion (aAddVersion),
    233         mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless) {}
     234        mAddActive (aAddActive), mSupportsSeamless (aSupportsSeamless),
     235        mSupportsGraphics (aSupportsGraphics) {}
    234236    const QString &osTypeId() const { return mOsTypeId; }
    235237    const QString &additionVersion() const { return mAddVersion; }
    236238    bool additionActive() const { return mAddActive; }
    237239    bool supportsSeamless() const { return mSupportsSeamless; }
     240    bool supportsGraphics() const { return mSupportsGraphics; }
    238241private:
    239242    QString mOsTypeId;
     
    241244    bool mAddActive;
    242245    bool mSupportsSeamless;
     246    bool mSupportsGraphics;
    243247};
    244248
     
    429433                                     guest.GetAdditionsVersion(),
    430434                                     guest.GetAdditionsActive(),
    431                                      guest.GetSupportsSeamless()));
     435                                     guest.GetSupportsSeamless(),
     436                                     guest.GetSupportsGraphics()));
    432437        return S_OK;
    433438    }
     
    11981203                emit additionsStateChanged (ge->additionVersion(),
    11991204                                            ge->additionActive(),
    1200                                             ge->supportsSeamless());
     1205                                            ge->supportsSeamless(),
     1206                                            ge->supportsGraphics());
    12011207                return true;
    12021208            }
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r8211 r8292  
    125125    , mIsSeamless (false)
    126126    , mIsSeamlessSupported (false)
     127    , mIsGraphicsSupported (false)
    127128    , was_max (false)
    128129    , console_style (0)
     
    808809    connect (console, SIGNAL (machineStateChanged (KMachineState)),
    809810             this, SLOT (updateMachineState (KMachineState)));
    810     connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool)),
    811              this, SLOT (updateAdditionsState (const QString &, bool, bool)));
     811    connect (console, SIGNAL (additionsStateChanged (const QString&, bool, bool, bool)),
     812             this, SLOT (updateAdditionsState (const QString &, bool, bool, bool)));
    812813    connect (console, SIGNAL (mediaChanged (VBoxDefs::DiskType)),
    813814             this, SLOT (updateMediaState (VBoxDefs::DiskType)));
     
    952953    /* If seamless mode should be enabled then check if it is enabled
    953954     * currently and re-enable it if seamless is supported */
    954     if (vmSeamlessAction->isChecked() && mIsSeamlessSupported)
     955    if (   vmSeamlessAction->isChecked()
     956        && mIsSeamlessSupported
     957        && mIsGraphicsSupported)
    955958        toggleFullscreenMode (true, true);
    956959    mIsOpenViewFinished = true;
     
    10721075#endif
    10731076
    1074     vmSeamlessAction->setEnabled (mIsSeamlessSupported);
     1077    vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported);
    10751078    vmFullscreenAction->setEnabled (true);
    10761079
     
    20532056        mIsFullscreen = aOn;
    20542057        vmAdjustWindowAction->setEnabled (!aOn);
    2055         vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported);
     2058        vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported);
    20562059    }
    20572060
     
    23412344{
    23422345    /* check if it is possible to enter/leave seamless mode */
    2343     if (mIsSeamlessSupported || !aOn)
     2346    if (mIsSeamlessSupported && mIsGraphicsSupported || !aOn)
    23442347    {
    23452348        bool ok = toggleFullscreenMode (aOn, true /* aSeamless */);
     
    32723275void VBoxConsoleWnd::updateAdditionsState (const QString &aVersion,
    32733276                                           bool aActive,
    3274                                            bool aSeamlessSupported)
    3275 {
    3276     vmAutoresizeGuestAction->setEnabled (aActive);
    3277     if (mIsSeamlessSupported != aSeamlessSupported)
    3278     {
    3279         vmSeamlessAction->setEnabled (aSeamlessSupported);
     3277                                           bool aSeamlessSupported,
     3278                                           bool aGraphicsSupported)
     3279{
     3280    vmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported);
     3281    if (   (mIsSeamlessSupported != aSeamlessSupported)
     3282        || (mIsGraphicsSupported != aGraphicsSupported))
     3283    {
     3284        vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported);
    32803285        mIsSeamlessSupported = aSeamlessSupported;
     3286        mIsGraphicsSupported = aGraphicsSupported;
    32813287        /* If seamless mode should be enabled then check if it is enabled
    32823288         * currently and re-enable it if open-view procedure is finished */
    3283         if (vmSeamlessAction->isChecked() && mIsOpenViewFinished && aSeamlessSupported)
     3289        if (   vmSeamlessAction->isChecked()
     3290            && mIsOpenViewFinished
     3291            && aSeamlessSupported
     3292            && aGraphicsSupported)
    32843293            toggleFullscreenMode (true, true);
    32853294    }
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