VirtualBox

Changeset 21772 in vbox


Ignore:
Timestamp:
Jul 22, 2009 10:46:26 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt: fix a double mouse pointer issue in Moblin

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

Legend:

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

    r20243 r21772  
    8888
    8989    bool isMouseAbsolute() const { return mMouseAbsolute; }
     90
     91    bool shouldHideHostPointer() const
     92    { return mMouseCaptured || (mMouseAbsolute && mHideHostPointer); }
    9093
    9194    void setAutoresizeGuest (bool on);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r21712 r21772  
    733733    , mDesktopGeo (DesktopGeo_Invalid)
    734734    , mPassCAD (false)
    735     , mHideHostPointer (false)
     735      /* Don't show a hardware pointer until we have one to show */
     736    , mHideHostPointer (true)
    736737{
    737738    Assert (!mConsole.isNull() &&
     
    11321133     * OnMousePointerShapeChange event handler.
    11331134     *
    1134      * This is necessary to avoid double-cursor issue when both the
    1135      * guest and the host cursors are displayed in one place one-above-one.
     1135     * This is necessary to avoid double-cursor issues where both the
     1136     * guest and the host cursors are displayed in one place, one above the
     1137     * other.
    11361138     *
    1137      * This is a workaround because the correct decision is to notify
     1139     * This is a workaround because the correct decision would be to notify
    11381140     * the Guest Additions about we are entering the mouse integration
    11391141     * mode. The GuestOS should hide it's cursor to allow using of
    11401142     * host cursor for the guest's manipulation.
    11411143     *
    1142      * This notification is not possible right now due to there is
    1143      * no the required API. */
     1144     * This notification is not always possible though, as not all guests
     1145     * support switching to a hardware pointer on demand. */
    11441146    if (enabled)
    11451147        viewport()->setCursor (QCursor (Qt::BlankCursor));
     
    12351237                 * for details. */
    12361238                QCursor cursor;
    1237                 if (!mHideHostPointer)
     1239                if (shouldHideHostPointer())
     1240                    cursor = QCursor (Qt::BlankCursor);
     1241                else
    12381242                    cursor = viewport()->cursor();
    1239                 else
    1240                     cursor = QCursor (Qt::BlankCursor);
    12411243                mFrameBuf->resizeEvent (re);
    12421244                viewport()->setCursor (cursor);
    12431245#else
    12441246                mFrameBuf->resizeEvent (re);
    1245                 if (!mHideHostPointer)
     1247                if (shouldHideHostPointer())
     1248                    viewport()->setCursor (QCursor (Qt::BlankCursor));
     1249                else
    12461250                    viewport()->unsetCursor();
    1247                 else
    1248                     viewport()->setCursor (QCursor (Qt::BlankCursor));
    12491251#endif
    12501252
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