VirtualBox

Changeset 3078 in vbox for trunk


Ignore:
Timestamp:
Jun 7, 2007 4:18:31 PM (18 years ago)
Author:
vboxsync
Message:

1859: FE/Qt Mouse cursor issue:

Fix for the issue #1:
VBoxDefs::ResizeEventType event appears in case of guest video sub-system was changed for somehow even without video resolution change. In this last case the host VM window will not be resized according this event and the host mouse cursor which was unset to "default" here will not be hidden in capture state. So it is necessary to perform updateMouseClipping() for the guest resize event if the mouse cursor was captured before.

Fix for the issue #3:
When we are entering mouse integration mode we have to notify the guest system about it to make sure the guest will hide it’s cursor to let using of host's cursor for the guest mouse manipulation. This is not possible for the current API. That is why we have two cursors displayed one-above-one at the entering mouse integration mode. So we have to temporary hide host cursor and wait until guest hide it’s cursor and send a message about shape change to the host.

File:
1 edited

Legend:

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

    r3063 r3078  
    819819        captureMouse (!enabled, false);
    820820
     821    /* Hiding host cursor in case we are entering mouse integration
     822     * mode until it's shape is set to the guest cursor shape in
     823     * OnMousePointerShapeChange event handler.
     824     *
     825     * This is necessary to avoid double-cursor issue when both the
     826     * guest and the host cursors are displayed in one place one-above-one.
     827     *
     828     * This is a workaround because the correct decision is to notify
     829     * the Guest Additions about we are entering the mouse integration
     830     * mode. The GuestOS should hide it's cursor to allow using of
     831     * host cursor for the guest's manipulation.
     832     *
     833     * This notification is not possible right now due to there is
     834     * no the required API. */
     835    if (enabled)
     836        viewport()->setCursor (QCursor (BlankCursor));
     837
    821838    mouse_integration = enabled;
    822839
     
    893910                fb->resizeEvent (re);
    894911                viewport()->unsetCursor();
     912
     913                /* This event appears in case of guest video was changed
     914                 * for somehow even without video resolution change.
     915                 * In this last case the host VM window will not be resized
     916                 * according this event and the host mouse cursor which was
     917                 * unset to default here will not be hidden in capture state.
     918                 * So it is necessary to perform updateMouseClipping() for
     919                 * the guest resize event if the mouse cursor was captured. */
     920                if (mouse_captured)
     921                    updateMouseClipping();
    895922
    896923                /* apply maximum size restriction */
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