VirtualBox

Changeset 26967 in vbox


Ignore:
Timestamp:
Mar 2, 2010 6:32:10 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: multi-monitor captured/released mouse issue fix.

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

Legend:

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

    r26964 r26967  
    587587    /* Mouse capability state-change updater: */
    588588    connect(uisession(), SIGNAL(sigMouseCapabilityChange()), this, SLOT(sltMouseCapabilityChanged()));
     589
     590    /* Mouse captivity status-change updater: */
     591    connect(uisession(), SIGNAL(sigMouseCapturedStatusChanged()), this, SLOT(sltMouseCapturedStatusChanged()));
    589592}
    590593
     
    11261129    /* Notify all listeners: */
    11271130    emitMouseStateChanged();
     1131}
     1132
     1133void UIMachineView::sltMouseCapturedStatusChanged()
     1134{
     1135    if (!uisession()->isMouseCaptured())
     1136    {
     1137        /* We will just release mouse if it was released in other than that window: */
     1138#ifndef Q_WS_WIN32
     1139        viewport()->releaseMouse();
     1140#endif
     1141        /* Also we will unset cursor if mouse was released in other than that window: */
     1142        viewport()->unsetCursor();
     1143    }
    11281144}
    11291145
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r26929 r26967  
    156156    virtual void sltMouseCapabilityChanged();
    157157
     158    /* Session callback handlers: */
     159    virtual void sltMouseCapturedStatusChanged();
     160
    158161private slots:
    159162
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r26964 r26967  
    128128
    129129    /* Mouse setters: */
    130     void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; }
     130    void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; emit sigMouseCapturedStatusChanged(); }
    131131    void setMouseIntegrated(bool fIsMouseIntegrated) { m_fIsMouseIntegrated = fIsMouseIntegrated; }
    132132
     
    152152    void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
    153153
     154    /* Session signals: */
     155    void sigMouseCapturedStatusChanged();
     156
    154157private slots:
    155158
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